-
Notifications
You must be signed in to change notification settings - Fork 158
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
dnfbase: Fix substitutions #1380
Conversation
Branching for Fedora 40 revealed a problem with using substitutions in the GPG key name, @AdamWill fixed this by setting them on the Base object which appears to be the correct way to do it. Remove the per-repo kludge and set releasever and basearch on the Base variables so they are used everywhere.
Fixes #1379 |
well, I tried it this way, and it seems to be working. I do kinda feel like I want to ask dnf5 folks what exactly is going on here and if this is the right way, though - @jan-kolarik @m-blaha ? edit: for more context, my original PR was #1379 which just added this approach for |
The current situation looks as expected from the DNF point of view. You set up the variables, and then when the repositories are created, they are substituted with the real values in However, I couldn't find proper documentation for this in the current API docs, so I've added it to our existing issue, and we'll strive to provide better documentation soon. |
Pull Request Test Coverage Report for Build 7933079822Details
💛 - Coveralls |
@jan-kolarik thanks! Just to be clear - when you say "The current situation looks as expected from the DNF point of view", do you mean the "current situation" as in "the changes in this pull request are correct"? |
Yes, sorry for my cumbersome expressions 😛 |
@@ -153,6 +153,10 @@ def sanitize_repo(repo): | |||
log.info("Using %s for module_platform_id", platform_id) | |||
conf.module_platform_id = platform_id | |||
|
|||
# Set variables used for substitutions | |||
dnfbase.get_vars().set("releasever", releasever) | |||
dnfbase.get_vars().set("basearch", basearch) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a good place for setting vars.
The links refers to a commandline overrides from options. The patch looks OK. |
Can't figure out what's up with github. The tests pass, and I updated the checkout version like it suggested but it still says waiting for status. Merging it anyway. |
Branching for Fedora 40 revealed a problem with using substitutions in the GPG key name, @AdamWill fixed this by setting them on the Base object which appears to be the correct way to do it.
Remove the per-repo kludge and set releasever and basearch on the Base variables so they are used everywhere.