dnf5
dnf5 copied to clipboard
Document how to enable and disable repositories
E.g. dnf5 repo disable foo or dnf5 config-manager --set-disabled foo
Oh, is that dnf5 config-manager setopt foo.enabled=0?
The latter: dnf5 config-manager setopt foo.enabled=false.
We need to write a documentation for dnf5 repolist and dnf5 config-manager commands (part of issue #1011.
Wouldn't it be nice if dnf5 repo disable foo worked though?
And of course, dnf 4 has dnf config-manager --set-disabled, which is still nicer.
I agree that dnf5 repo disable foo would be handy. Though I'm not sure whether the move of all configuration changes to dnf5 config-manager was intentional. I will check it up with other DNF5 developers.
According to more experienced DNF developers, the missing way for enabling/disabling repositories with dnf5 repo was intentional. They prefer a single way over multiple ways. Mainly to simplify documentation and supported interfaces.
Looks like this was added for dnf5daemon in https://github.com/rpm-software-management/dnf5/pull/1266. It would be good to have it in dnf5 for symmetry. AFAICT, dnf5daemon-client generally exposes less functionality than dnf5 itself.
Looks like this was added for
dnf5daemonin #1266. It would be good to have it indnf5for symmetry. AFAICT,dnf5daemon-clientgenerally exposes less functionality thandnf5itself.
The way it is exposed in dnf5daemon is not aligned with dnf5, as the config-manager functionality is not exposed in dnf5daemon.
Oh, is that dnf5 config-manager setopt foo.enabled=0?
Yes, this is mentioned in the examples at https://dnf5.readthedocs.io/en/latest/dnf5_plugins/config-manager.8.html :
dnf5 config-manager setopt repoid1.enabled=1 repoid2.enabled=0
Sets override to enable repository identified by repoid1 and disable repository identified by repoid2.
Since config-manager already is documented I have added only an example to the repo command man page that links to it.
It could help users looking for that functionality.
PR: https://github.com/rpm-software-management/dnf5/pull/1601
For anyone running into this, dnf copr still supports enable and disable.
Oh, is that dnf5 config-manager setopt foo.enabled=0?
Yes, this is mentioned in the examples at https://dnf5.readthedocs.io/en/latest/dnf5_plugins/config-manager.8.html :
dnf5 config-manager setopt repoid1.enabled=1 repoid2.enabled=0 Sets override to enable repository identified by repoid1 and disable repository identified by repoid2.
whats the equivalent for something like this: dnf config-manager --set-disabled "*-testing*", quite surprising there won't be backward compatibility, especially from a prospective of a happy dnf4 user. 👴 📢 ☁️
whats the equivalent for something like this:
dnf config-manager --set-disabled "*-testing*"
That would be: dnf5 config-manager setopt *-testing*.enabled=0
This way it is consistent with the dnf's --setopt=[REPO_ID.]OPTION=VALUE option.
That would be:
dnf5 config-manager setopt *-testing*.enabled=0
This is awesome and it works, thanks for the reply. From example above I wrongly assumed that each repo needs to be called explicitly in dnf5