Skip to content
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

Document how to enable and disable repositories #1213

Closed
lnicola opened this issue Jan 29, 2024 · 13 comments
Closed

Document how to enable and disable repositories #1213

lnicola opened this issue Jan 29, 2024 · 13 comments
Assignees
Labels
Priority: MEDIUM Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take
Milestone

Comments

@lnicola
Copy link

lnicola commented Jan 29, 2024

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

@lnicola
Copy link
Author

lnicola commented Jan 29, 2024

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

@ppisar
Copy link
Contributor

ppisar commented Feb 1, 2024

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.

@lnicola
Copy link
Author

lnicola commented Feb 1, 2024

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.

@ppisar ppisar changed the title Support enabling and disabling repos Document how to enable and disable repositories Feb 1, 2024
@jan-kolarik jan-kolarik added the Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take label Feb 2, 2024
@jan-kolarik jan-kolarik added this to the Fedora 41 milestone Feb 2, 2024
@ppisar
Copy link
Contributor

ppisar commented Feb 5, 2024

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
Copy link
Contributor

ppisar commented Feb 5, 2024

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.

@lnicola
Copy link
Author

lnicola commented Mar 18, 2024

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.

@jan-kolarik
Copy link
Member

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.

@jrohel
Copy link
Contributor

jrohel commented May 9, 2024

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.

kontura added a commit to kontura/dnf5 that referenced this issue Jul 30, 2024
While this example isn't for the `repo` command it could be useful to
users looking into the man page.

For: rpm-software-management#1213
@kontura kontura self-assigned this Jul 30, 2024
@kontura
Copy link
Contributor

kontura commented Jul 30, 2024

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: #1601

kontura added a commit to kontura/dnf5 that referenced this issue Jul 31, 2024
While this example isn't for the `repo` command it could be useful to
users looking into the man page.

For: rpm-software-management#1213
github-merge-queue bot pushed a commit that referenced this issue Jul 31, 2024
While this example isn't for the `repo` command it could be useful to
users looking into the man page.

For: #1213
@lnicola
Copy link
Author

lnicola commented Jul 31, 2024

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

@paravz
Copy link

paravz commented Oct 6, 2024

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

@kontura
Copy link
Contributor

kontura commented Oct 7, 2024

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.

@paravz
Copy link

paravz commented Oct 7, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: MEDIUM Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take
Projects
Archived in project
Development

No branches or pull requests

6 participants