# dnf -y install pkg1 pkg2 pkg3 Updating and loading repositories: ... Repositories loaded. Failed to resolve the transaction: No match for argument: pkg3 You can try to add to command line: --skip-unavailable to skip unavailable packages
# dnf -y --skip-unavailable install pkg1 pkg2 pkg3 Unknown argument "--skip-unavailable" for command "dnf5". Add "--help" for more information about the arguments.
Obviously, DNF should not tell a user to use an option that isn't actually available...
On Sat, Nov 23, 2024 at 4:54 PM Dave Close dave@compata.com wrote:
# dnf -y install pkg1 pkg2 pkg3 Updating and loading repositories: ... Repositories loaded. Failed to resolve the transaction: No match for argument: pkg3 You can try to add to command line: --skip-unavailable to skip unavailable packages
# dnf -y --skip-unavailable install pkg1 pkg2 pkg3 Unknown argument "--skip-unavailable" for command "dnf5". Add "--help" for more information about the arguments.
Obviously, DNF should not tell a user to use an option that isn't actually available...
First, I agree the "helpful" message could and should be better.
I have not upgraded to F41 but from what I have seen on the list, it seems to me that: 1) dnf5 is implemented in python 2) dnf5 is using "argparse" to parse command line options 3) dnf5 is using "argparse subparsers" to implement the dnf5 commands
This means that options are going to be positional relative to the commands. Until "install" is encountered on the command line, there *Is no* "--skip-unavailable" option. Likewise, it might not accept "-y" *after* "install".
Assuming dnf5 doesn't completely override the "argparse" help formatting, you could confirm by trying "dnf --help" and comparing to "dnf install --help".
HTH, FWIW, &c....
On Sat, 2024-11-23 at 13:53 -0800, Dave Close wrote:
# dnf -y install pkg1 pkg2 pkg3 Updating and loading repositories: ... Repositories loaded. Failed to resolve the transaction: No match for argument: pkg3 You can try to add to command line: --skip-unavailable to skip unavailable packages
# dnf -y --skip-unavailable install pkg1 pkg2 pkg3 Unknown argument "--skip-unavailable" for command "dnf5". Add "--help" for more information about the arguments.
According to the man page for dnf5 the command has to come first, i.e. it's 'dnf COMMAND OPTIONS ARGS', so your example would be wrong even if --skip-unavailable were an option (which apparently it isn't).
Obviously, DNF should not tell a user to use an option that isn't actually available...
Indeed. Should probably be reported as a bug.
poc
Dave Close wrote on 2024/11/24 6:53:
# dnf -y install pkg1 pkg2 pkg3 Updating and loading repositories: ... Repositories loaded. Failed to resolve the transaction: No match for argument: pkg3 You can try to add to command line: --skip-unavailable to skip unavailable packages
# dnf -y --skip-unavailable install pkg1 pkg2 pkg3 Unknown argument "--skip-unavailable" for command "dnf5". Add "--help" for more information about the arguments.
Obviously, DNF should not tell a user to use an option that isn't actually available...
As said in $ dnf help , dnf5 command like is:
$ dnf <global options> <command> <options> ...
and "-y" is <global options>, "install" is <command>, and "--skip-unavailable" is one of the options of "install" <command>.
Regards, Mamoru
Go Canes wrote:
I wrote:
# dnf -y --skip-unavailable install pkg1 pkg2 pkg3 Unknown argument "--skip-unavailable" for command "dnf5".
First, I agree the "helpful" message could and should be better.
... options are going to be positional relative to the commands. Until "install" is encountered on the command line, there *Is no* "--skip-unavailable" option. Likewise, it might not accept "-y" *after* "install".
Thank you. I have read about the change to parameter sequence but it hasn't yet become an ingrained habit. Soon perhaps...
On Sat, 2024-11-23 at 22:22 +0000, Patrick O'Callaghan wrote:
According to the man page for dnf5 the command has to come first, i.e. it's 'dnf COMMAND OPTIONS ARGS', so your example would be wrong even if --skip-unavailable were an option (which apparently it isn't).
In fact it's an option of the install command. dnf5 has multiple man pages, so you need to look in 'man dnf-install'.
poc
Go Canes wrote:
I have not upgraded to F41 but from what I have seen on the list, it seems to me that:
- dnf5 is implemented in python
- dnf5 is using "argparse" to parse command line options
- dnf5 is using "argparse subparsers" to implement the dnf5 commands
It is true that dnf5 parses arguments differently than dnf 4.x. But that's not anything to do with python as dnf5 is written in C++. That's not important to the outcome here, but it seems worth noting.
On 23 Nov 2024, at 22:18, Go Canes letsgonhlcanes0@gmail.com wrote:
I have not upgraded to F41 but from what I have seen on the list, it seems to me that:
- dnf5 is implemented in python
Dnf4 is python, dnf5 is c++.
Barry