Skip to content

Conversation

joshcooper
Copy link
Contributor

On Fedora 41, yum is a symlink to dnf5, which doesn't accept -d:

Could not update: Execution of '/usr/bin/yum -d 0 -e 0 -y update puppet-agent-8.15.0.9.g6d2fce25b' returned 2: Unknown argument "-d" for command "dnf5". Add "--help" for more information about the arguments.

Puppet's dnf provider was updated to support dnf5 in PA-7414, see puppetlabs/puppet-private@0d932d327ef, but that doesn't help if the provider is explicitly set to yum.

@joshcooper joshcooper requested review from bastelfreak and a team as code owners September 29, 2025 19:53
# any other type of source means we use a package manager (yum) with no 'source' parameter in the
# package resource below
$_package_version = $package_version
$_provider = 'yum'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we even have to set the provider? Can't we use undef?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaving it unspecified makes sense in general.. but it's been this way for so long, I didn't want to break anything. This is especially true because when doing an agent upgrade from 6.x to 8.x, we run the 6.x version of the provider to perform the upgrade. If we switch to dnf, then we have to be sure dnf in puppet 6.x works when upgrading to 8.x.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be fine using undef for fedora 41 and up. It doesn't work now, so no harm in changing it.

On Fedora 41, `yum` is a symlink to dnf5, which doesn't accept -d:

    Could not update: Execution of '/usr/bin/yum -d 0 -e 0 -y update puppet-agent-8.15.0.9.g6d2fce25b' returned 2: Unknown argument "-d" for command "dnf5". Add "--help" for more information about the arguments.

Puppet's dnf provider was updated to support dnf5 in PA-7414, see
puppetlabs/puppet-private@0d932d327ef, but that doesn't help if the provider is
explicitly set to `yum`.
puppetlabs/puppetlabs-inifile@64aaa08#diff-009cf0f832b3fccfa64213c7b2d0fb136df78deec09ac2a21b6d86d729ef3436R63 causes puppet_agent specs to fail on ruby 2.7:

    Evaluation Error: Error while evaluating a Resource Statement, Could not autoload puppet/type/ini_setting: /Users/runner/work/puppetlabs-puppet_agent/puppetlabs-puppet_agent/spec/fixtures/modules/inifile/lib/puppet/type/ini_setting.rb:63: syntax error, unexpected '}'
    ..., not '%{value}'") % { value: }) unless Puppet::Util.absolut...

For now, pin to the most recently released version.
@cthorn42 cthorn42 merged commit 8d062b8 into main Oct 2, 2025
12 checks passed
@cthorn42 cthorn42 deleted the fedora41 branch October 2, 2025 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants