-
Notifications
You must be signed in to change notification settings - Fork 143
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
Add the possibility to load filelists conditionally #1635
Conversation
ca59009
to
3318b63
Compare
3318b63
to
45efc6d
Compare
The last piece that is not covered is requires, conflict, and version. I recommend to increase minor version +1. The same for DNF. I also recommend to ensure that the new libdnf cannot be installed with old version of DNF because when the default will change to FALSE then the old version of DNF stops to download filelists without possibility of override. A conflict in |
Thanks for info. I was planning to implement this in a separate follow-up PR. This one is just mentioned to have the same functionality as until now, but prepare the internals for the easy switch to "enable_filelists = false;" by default. |
45efc6d
to
d9db6cd
Compare
d9db6cd
to
d8a3df1
Compare
Prepare libdnf to not load the filelists metadata by default in the future. They will be loaded only when requested through the `optional_metadata_types` configuration option.
A new optional_metadata_types option was created to be used for configuring if filelists metadata should be downloaded by default.
Use the default value for enabling filelists metadata from main configuration. Override the value when explicitly using the setter.
d8a3df1
to
edc343c
Compare
@j-mracek I simplified the PR, so the decision to load filelists is only loaded from the |
|
||
auto & optionalMetadataTypes = conf->getMainConfig().optional_metadata_types().getValue(); | ||
auto loadFilelists = std::find(optionalMetadataTypes.begin(), optionalMetadataTypes.end(), "filelists") != | ||
optionalMetadataTypes.end(); |
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.
This is great idea
LGTM as well rpm-software-management/dnf#2012.
libdnf.spec
I also have been thinking about dnf.spec
|
The first item has been delivered, and the other two will be addressed in the follow-up rpm-software-management/dnf#2038. |
7efb69a
to
2986bdb
Compare
LGTM |
Setup the
Repo
objects to allow conditional loading of the filelists metadata.A new
optional_metadata_types
option was created to be used for configuring if filelists metadata should be downloaded by default.Currently, the changes should not introduce any new behavior by default. The introduction of dropping the filelists loading by default should come after the system-wide change proposal is accepted.
Follow-up PR in dnf: rpm-software-management/dnf#2012.
Related: #1637.
Targetted for: https://issues.redhat.com/browse/RHEL-12355.