rpm-software-management / dnf5

Next-generation RPM package management system
Other
258 stars 87 forks source link

dnf config-manager--set-enabled #1840

Open m-blaha opened 2 weeks ago

m-blaha commented 2 weeks ago

The CI on one of my projects got upgraded to dnf5, which broke it because dnf config-manager --set-enabled=$repo no longer works.

For reference, here's a github search for that invocation - excluding forks there's almost 5000 references to it on Github.

I don't think it makes sense for all of them to rewrite.

(Moved from https://github.com/rpm-software-management/dnf-plugins-core/issues/565 dnf-plugins-core issue)

carlwgeorge commented 2 weeks ago

It looks like the design now is for config-manager to have proper subcommands, rather than subcommands masquerading as flags. For example, dnf config-manager --add-repo is now dnf config-manager addrepo. However, there isn't a subcommand for the old --set-enabled or --set-disabled flags. I did find a workaround using the setopt subcommand.

Instead of this dnf4 command:

dnf config-manager --set-enabled updates-testing

You can do this in dnf5:

dnf config-manager setopt updates-testing.enabled=1

I do agree that it would be nice to at least have setenabled and setdisabled subcommands for consistency and to be easier to remember.