-
Notifications
You must be signed in to change notification settings - Fork 97
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
Restore PM-specific option specification in mock config #1074
Conversation
0ef1812
to
a3374bb
Compare
This is pretty messy, but we need to unblock RHEL 9 builds. The CI on this PR demonstrates that it's working as expected, and I manually verified that we didn't regress Fedora. |
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.
Just a small nitpick. Otherwise, LGTM!
Thanks for the quick fix!
# Deal with dnf -> dnf4 transition - see rpm-software-management/mock#1496 | ||
if package_manager == 'dnf': | ||
config_opts[f'dnf4_builddep_opts'] = config_opts.get(f'dnf4_builddep_opts', []) + ['--setopt=install_weak_deps=True'] |
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.
Is this needed on top of L22 because config_opts['dnf4_builddep_opts']
is checked in addition to / instead of config_opts['dnf_builddep_opts']
in some situations? If so, I think @azeey's suggestion also makes sense.
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.
The transition in mock is pretty muddy. The situations I'm aware of are:
- There is only
dnf
anddnf_builddep_opts
- package_manager is
dnf
, which is an alias fordnf4
anddnf4_builddep_opts
is what we want set - package_manager is now
dnf4
and we wantdnf4_builddep_opts
as before
TBH it doesn't really hurt to drop the conditional and just set the config even if it won't be used, but I think may help in future forensics to understand the purpose of the duplicated code.
It appears that we actually WANT this configuration key to change with the package manager, and this will be required as mock now supports multiple DNF tools. This is all a bit of a mess right now. There isn't a straightforward way to determine which package manager we should be using, and mock is in the process of transitioning the default PM to dnf5, where it was previously unversioned dnf (which means dnf4). This reverts part of ed19495
a3374bb
to
d162c54
Compare
It appears that we actually WANT this configuration key to change with the package manager, and this will be required as mock now supports multiple DNF tools.
This reverts part of ed19495