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

libdnf actions plugin: possibility to modify per-repository configuration #1345

Closed
t184256 opened this issue Mar 25, 2024 · 2 comments · Fixed by #1539
Closed

libdnf actions plugin: possibility to modify per-repository configuration #1345

t184256 opened this issue Mar 25, 2024 · 2 comments · Fixed by #1539
Assignees
Labels
Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take

Comments

@t184256
Copy link

t184256 commented Mar 25, 2024

It is possible to output conf.<option_name>=<value> from .actions to alter DNF configuration, but it'd also be nice to be able to override repository configuration that way, similarly to how it was possible to, say,

for name, repo in self.base.repos.items():
    repo.<option_name> = <value>

Would probably also be useful to provide a ${repository_names} to iterate over.

@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 Apr 9, 2024
@jmontleon
Copy link

I am using and was looking at what it would take to rewrite this plugin. It's pretty straightforward, but I think this is the functionality that's missing to make it possible.

https://github.com/michel-ludwig/dnf-local-mirror-detection/blob/master/src/local-mirror-detection.py

@jrohel
Copy link
Contributor

jrohel commented Jun 10, 2024

@t184256
I prepared a PR #1539 which adds support for per-repository configuration modification.
Also adds ${conf.<repoid_pattern>.<option_name>[=<value_pattern>]} substitution. This is much more powerful than the proposed ${repository_names}.
More information in PR.

I'm also working on an even more flexible interface #1538 . But currently this work has a low priority.

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

Successfully merging a pull request may close this issue.

4 participants