Skip to content
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

-- to signify the end of command line options not accepted by dnf CLI any more #1848

Open
thozza opened this issue Nov 11, 2024 · 0 comments
Labels
Priority: MEDIUM Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take

Comments

@thozza
Copy link

thozza commented Nov 11, 2024

DNF4, as many other Bash utilities and command line tools, accepted -- to signify the end of command line options, after which only positional arguments will follow.

We used this in many of our scripts which take list of packages as an argument and pass it internally to dnf, so that user's of the script can't sneak in any CLI options as a package name. This regression has a high potential to break existing scripts that call dnf.

$ sudo dnf install -- gcc
Last metadata expiration check: 0:38:52 ago on Po 11. listopadu 2024, 09:07:19.
Package gcc-14.2.1-3.fc40.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!

$ ls -l /usr/bin/dnf
lrwxrwxrwx. 1 root root 5 15. srp 02.00 /usr/bin/dnf -> dnf-3

$ rpm -q dnf
dnf-4.21.1-1.fc40.noarch
[root@0552a5d51b45 /]# dnf install -- gcc
Unknown argument "--" for command "install". Add "--help" for more information about the arguments.

[root@0552a5d51b45 /]# ls -l /usr/bin/dnf
lrwxrwxrwx. 1 root root 4 Sep 20 00:00 /usr/bin/dnf -> dnf5

[root@0552a5d51b45 /]# rpm -q dnf5
dnf5-5.2.6.2-1.fc41.x86_64
@m-blaha m-blaha added Priority: MEDIUM Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take labels Nov 11, 2024
thozza added a commit to thozza/containers that referenced this issue Nov 12, 2024
thozza added a commit to osbuild/containers that referenced this issue Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: MEDIUM Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take
Projects
None yet
Development

No branches or pull requests

2 participants