Skip to content

Commit

Permalink
allow RpmNameGlob for versionlock entries
Browse files Browse the repository at this point in the history
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
  • Loading branch information
foxxx0 committed Apr 11, 2022
1 parent 5c8a70b commit de4dfd3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion manifests/versionlock.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
}

Expand Down

0 comments on commit de4dfd3

Please sign in to comment.