-
Notifications
You must be signed in to change notification settings - Fork 72
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
conf: New classes for append options #1495
Conversation
8132629
to
71bcf4a
Compare
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.
It might be useful to also add some more unit / CI tests for the empty values inside of the option containers to make sure it behaves like it should...
Good point. I will add more tests. |
Introducing `OptionStringAppendList` and `OptionStringAppendSet` classes for append options. The current implementation of append options is flawed because it requires the options to be set in ascending order of priority for proper functionality. This is necessary for the resetting mechanism using an empty item to work correctly. However, in dnf5, options are not processed strictly in priority order. For instance, command line options like `--exclude` are processed before the configuration files, despite having a higher priority than config files. The new classes accumulate all setting attempts and then process them in priority order to compute the actual value.
Converted main options: - excludepkgs - includepkgs - installonlypkgs - optional_metadata_types - protected_packages - tsflags Converted repository options: - excludepkgs - includepkgs - protected_packages
- Add couple of tests of append option behavior - Fix Python config option unittest
71bcf4a
to
c6e518e
Compare
Introducing
OptionStringAppendList
andOptionStringAppendSet
classesfor append options.
The current implementation of append options is flawed because it requires
the options to be set in ascending order of priority for proper
functionality. This is necessary for the resetting mechanism using an empty
item to work correctly. However, in dnf5, options are not processed
strictly in priority order. For instance, command line options like
--exclude
are processed before the configuration files, despite having ahigher priority than config files.
The new classes accumulate all setting attempts and only process them in
priority order when the option value is needed.
Resolves: #1331