-
Notifications
You must be signed in to change notification settings - Fork 86
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 -x=dnf install dnf
does not work as expected
#1353
Comments
I think we do not support syntax with |
We don't. dnf5(8) manual agrees it's an invalid invocation. I would rather fix the option parser to reject "-x=dnf" as an invalid option. |
Also this behavior should be documented in the dnf4 vs dnf5 changes doc. |
DNF5 command line options format: Prefix of long option Examples with the same meaning:
In DNF5, there is already a lot of freedom when entering options on the command line. |
I agree. I'd prefer to not implement |
Be honest |
I see as a problem that DNF5 is not unified in using option separators.
And with excludes you will not get any error, but only a different behavior that might be difficult to discover. |
This would be another option how to handle the issue. |
It unifies behavioe with long options and provide compatibility with DNF4 and rpm. Closes: rpm-software-management#1353
As a console user, I like applications to behave consistently. And when I wrote the argument parser, I wanted it to be consistent with the rest of the system. The Is the fact that rpm parses the short option list differently than the other standard utilities on the system enough reason for us to do it differently too? I don't want to be surprised when one day I want to set a value with I understand that it may be a surprise to a beginner that Examples:
|
The patch (#1434) unifies the behavior with DNF4, RPM and other project that uses |
It unifies behavioe with long options and provide compatibility with DNF4 and rpm. Closes: rpm-software-management#1353
It prevents silently skipping the change in behavior between DNF4 and DNF5 Where `-x=dnf` excluded `dnf` but in DNF5 it excludes `=dnf`. Without the exception it would be hard to detect that something might work differently then expected. Closes: rpm-software-management#1353
It prevents silently skipping the change in behavior between DNF4 and DNF5 Where `-x=dnf` excluded `dnf` but in DNF5 it excludes `=dnf`. Without the exception it would be hard to detect that something might work differently then expected. Closes: rpm-software-management#1353
Here is an alternative solution mentioned by Petr Pisar above - Reject |
I tested DNF4. And I found that it doesn't support the
|
@jrohel I understand your point and I am not pushing any solution. I have one very strong concern - the change of behavior is silent therefore very difficult to discover. So far we have 4 options
DNF and DNF5 does not validate configuration - string |
I was searching for some existing standard related to this topic and found the following link: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html. According to 2. a., conforming applications should support both Given the existing feedback, I'm personally in favor of not supporting EDIT: Oh, Marek had already posted the IEEE link. Although I read his post, I somehow missed this. :) |
Since there has been no feedback for some time, let's finalize our implementation approach. It seems we agree on not supporting the The last thing to decide is whether to throw an exception when the |
-x=dnf
addsexclude = =dnf
to configuration. Try--dump-main-config
to see it.-x dnf
works as expectedProposing the bug as a bug with high priority, because the option is important and other options might be affected as well.
The text was updated successfully, but these errors were encountered: