dnf5 icon indicating copy to clipboard operation
dnf5 copied to clipboard

Document how to enable and disable repositories

Open lnicola opened this issue 1 year ago • 7 comments

E.g. dnf5 repo disable foo or dnf5 config-manager --set-disabled foo

lnicola avatar Jan 29 '24 20:01 lnicola

Oh, is that dnf5 config-manager setopt foo.enabled=0?

lnicola avatar Jan 29 '24 20:01 lnicola

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.

ppisar avatar Feb 01 '24 14:02 ppisar

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.

lnicola avatar Feb 01 '24 14:02 lnicola

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.

ppisar avatar Feb 05 '24 11:02 ppisar

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.

ppisar avatar Feb 05 '24 14:02 ppisar

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.

lnicola avatar Mar 18 '24 08:03 lnicola

Looks like this was added for dnf5daemon in #1266. It would be good to have it in dnf5 for symmetry. AFAICT, dnf5daemon-client generally exposes less functionality than dnf5 itself.

The way it is exposed in dnf5daemon is not aligned with dnf5, as the config-manager functionality is not exposed in dnf5daemon.

jan-kolarik avatar Mar 18 '24 08:03 jan-kolarik

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.

jrohel avatar May 09 '24 13:05 jrohel

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

kontura avatar Jul 30 '24 11:07 kontura

For anyone running into this, dnf copr still supports enable and disable.

lnicola avatar Jul 31 '24 11:07 lnicola

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. 👴 📢 ☁️

paravz avatar Oct 06 '24 04:10 paravz

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.

kontura avatar Oct 07 '24 04:10 kontura

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

paravz avatar Oct 07 '24 06:10 paravz