-
-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dnf5 support for puppet-yum #338
Comments
Apparently /usr/bin/yum works the legacy way, but I couldn't find where to change dnf to yum, tried to put this module in my modules directory, and sedded all dnf:s to yum. But it still used the built in module :( |
This is a proof of concept diff that solves the issue. Of course, it causes problems for historic releases, although we probably have to go back a long time. centos 7 already supports the new syntax, and is EOL. diff --git a/manifests/group.pp b/manifests/group.pp
index 2a4f7c6..47f44be 100644
--- a/manifests/group.pp
+++ b/manifests/group.pp
@@ -23,13 +23,13 @@ define yum::group (
case $ensure {
'present', 'installed', default: {
exec { "yum-groupinstall-${name}":
- command => join(concat(["yum -y groupinstall '${name}'"], $install_options), ' '),
+ command => join(concat(["yum -y group install '${name}'"], $install_options), ' '),
unless => "yum grouplist hidden '${name}' | egrep -i '^Installed.+Groups:$'",
timeout => $timeout,
}
if $ensure == 'latest' {
exec { "yum-groupinstall-${name}-latest":
- command => join(concat(["yum -y groupinstall '${name}'"], $install_options), ' '),
+ command => join(concat(["yum -y group install '${name}'"], $install_options), ' '),
onlyif => "yum groupinfo '${name}' | egrep '\\s+\\+'",
timeout => $timeout,
require => Exec["yum-groupinstall-${name}"],
@@ -39,8 +39,8 @@ define yum::group (
'absent', 'purged': {
exec { "yum-groupremove-${name}":
- command => "yum -y groupremove '${name}'",
- onlyif => "yum grouplist hidden '${name}' | egrep -i '^Installed.+Groups:$'",
+ command => "yum -y group remove '${name}'",
+ onlyif => "yum group list hidden '${name}' | egrep -i '^Installed.+Groups:$'",
timeout => $timeout,
}
} |
I just upgraded to Fedora 41 and that has dnf5 installed by default and since then puppet-yum fails like this:
I bet there are more things that fail. Since fedora 41 will be released shortly, I'd like to request if someone could add compatibility with dnf5.
The text was updated successfully, but these errors were encountered: