Skip to content

Replace erase with remove, since it's no longer supported with DNF5 #68

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

Merged
merged 3 commits into from
May 23, 2025

Conversation

Stricken1670
Copy link
Contributor

From the dnf4 manpage:

   Remove Command
       Command: remove
       Aliases: rm
       Aliases for explicit NEVRA matching: remove-n, remove-na, remove-nevra
       Deprecated aliases: erase, erase-n, erase-na, erase-nevra

Resulting in this error on fedora 42, which has dnf5:

Error: Execution of '/usr/sbin/dnf -y erase pipewire-libs' returned 2: Unknown argument "erase" for command "dnf5". Add "--help" for more information about the arguments.
It could be a command provided by a plugin, try: dnf5 install 'dnf5-command(erase)'

I tested it by replacing erase with remove in /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/package/yum.rb and the package was properly removed.

This is analogous to PR #28

Needs some research, since when is this option removed, since when was
it deprecated.
nmburgan
nmburgan previously approved these changes May 23, 2025
@nmburgan
Copy link
Member

Tests are broken at the moment, but could you update https://github.com/OpenVoxProject/puppet/blob/5eaa4a7dfb7a8ea4d9ea4b1a892eeff8c4199f9d/spec/shared_examples/rhel_package_provider.rb#L193 as well?

@nmburgan nmburgan merged commit e179d54 into OpenVoxProject:main May 23, 2025
@smortex smortex added the bug Something isn't working label May 28, 2025
@smortex smortex changed the title Replace erase with remove, since it's no longer supported with dnf5 Replace erase with remove, since it's no longer supported with DNF5 May 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants