From de4dfd32614fc0466f9052599c9b7842aee130f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thore=20B=C3=B6decker?= Date: Thu, 4 Nov 2021 17:28:48 +0100 Subject: [PATCH] allow RpmNameGlob for versionlock entries As stated in the manpage [1] yum versionlock supports package-wildcard and does not require exact matches for package-names. The following is valid `versionlock.list` content: ``` libvirt*-0:7.6.0-*.* qemu*-0:6.1.0-*.* ``` This commit swaps `Yum::RpmName` with `Yum::RpmNameGlob` for the versionlock `assert_type()` and thus allowing the above mentioned examples. [1] https://man7.org/linux/man-pages/man1/yum-versionlock.1.html --- manifests/versionlock.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/versionlock.pp b/manifests/versionlock.pp index 0a6653dd..b4a27912 100644 --- a/manifests/versionlock.pp +++ b/manifests/versionlock.pp @@ -76,7 +76,7 @@ $_versionlock = "${line_prefix}${name}" } else { - assert_type(Yum::RpmName, $name) |$_expected, $actual | { + assert_type(Yum::RpmNameGlob, $name) |$_expected, $actual | { fail("Package name must be formatted as Yum::RpmName, not \'${actual}\'. See Yum::Rpmname documentation for details.") }