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

dnf5daemon: Introduce enabling repositories in Repo interface #1266

Merged
merged 2 commits into from
Mar 6, 2024

Conversation

jan-kolarik
Copy link
Member

@jan-kolarik jan-kolarik commented Feb 21, 2024

Move the existing functionality of enabling and disabling of repositories from the RepoConf interface.

Drop the RepoConf interface as the remaining list functionality that is required by clients is already provided by the Repo::list.

Change the logic of commands to be strict against invalid arguments.

Add support for introduced commands in the dnf5daemon client.

Tests: rpm-software-management/ci-dnf-stack#1456.
Closes: #771.

@jan-kolarik jan-kolarik force-pushed the jkolarik/daemon-enable-disable-repos branch from d0e4604 to bf247c5 Compare February 21, 2024 15:37
Move the existing functionality of enabling and disabling of repositories from the RepoConf interface.

Drop the RepoConf interface as the remaining list functionality
that is required by clients is already provided by the Repo::list.

Change the logic of commands to be strict against invalid arguments.
Also create parent command where all related repo subcommands are located.
@m-blaha
Copy link
Member

m-blaha commented Mar 5, 2024

/packit test –identifier dnf5daemon-tests

@m-blaha
Copy link
Member

m-blaha commented Mar 6, 2024

There is a small difference between what RepoConf.list() and Repo.list() do. The RepoConf interface returns contents of *.repo config files as they are - without any substitutions. OTOH Repo interface returns repositories as they are used - with variables substituted.

So from my point of view unifying all repo methods in one interface (Repo) makes sense. I'm not sure whether we need (have a user for) also RepoConf.list() functionality. But it can also be implemented in Repo interface with new names (like Repo.list_config()). Also we should unify attribute names used in Repo.list() and Repo.list_config(). Currently the former use patterns to filter repositories, the latter ids.

IIUC the original RepoConf interface was not documented so we should be able to drop it.

@m-blaha m-blaha added this pull request to the merge queue Mar 6, 2024
Merged via the queue into main with commit 4404696 Mar 6, 2024
14 of 22 checks passed
@m-blaha m-blaha deleted the jkolarik/daemon-enable-disable-repos branch March 6, 2024 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

dnf5daemon: Add functions to enable/disable repos in org.rpm.dnf.v0.rpm.Repo
2 participants