-
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
dnf5 append options functionality is broken #1331
Comments
There are append options tests available in ci-dnf-stack/dnf-behave-tests/dnf/append_options.feature which should be enabled for dnf5. |
dnf5(8) manual does not document a meaning of --exclude=''. It does so for --setopt only. |
Documentation is one of the problems with append options usability - you cannot say (even from config-main.hpp) which options are "append" and which are mere "list" options. And what's append options behavior - like for example that an empty first element (or completely empty value) resets current value. |
Adding additional possible solution Apply some configurations multiple times - it is not nice but functional (DNF4 solution). Basically some configuration must be applied earlier, because it modifies paths for low priority options. |
I think I got bitten by this bug: I have tsflag=nodoc in /etc/dnf/dnf.conf:
Then I add "--setopt=tsflags=" option to the command line to reset tsflags (as documented in dnf5(8)). Unexpectedly the nodocs is still enabled:
One could say it's a bug in --dump-main-config which could get evaluated before --setopt. But that's not case, the tsflag remains indeed enabled:
Just to confirm, If I remove the tsflags definition from the configuration file, the documentation file gets installed:
I conclude that "--setopt=tsflags=" does not reset tsflags. |
We need installing glib2 documentation files for building libmodulemd documentation. rpm-software-management/dnf5#1331
We need installing glib2 documentation files for building libmodulemd documentation. DNF5 fails to remove nodocs from configuration-file tsflags using a command-line option. rpm-software-management/dnf5#1331
@ppisar Yes. I'm already working on a fix. |
In case you have in dnf.conf:
but for the current run you want to cancel excludes:
Then dnf5 still uses excludes from the config file. This is basically caused by append options not respecting priorities and config file values were allowed to be added to command line values. The #1314 PR fixes this.
But then there is another problem:
Possible solutions:
OptionStringList
for append options, which will remember all items it was gradually set to with their respective priorities. Theget_value()
will then walk through this list in correct order and return correct values.The text was updated successfully, but these errors were encountered: