$ dnf --version 2.1.0 Installed: dnf-0:2.1.0-1.fc26.noarch at 2017-02-22 00:45 Built : Fedora Project at 2017-02-16 08:41 Installed: rpm-0:4.13.0.1-3.fc26.x86_64 at 2017-02-27 12:43 Built : Fedora Project at 2017-02-24 13:10 $ sudo dnf repoquery --duplicates --latest-limit -1 usage: dnf repoquery [-c [config file]] [-q] [-v] [--version] [--installroot [path]] [--noplugins] [--disableplugin [plugin]] [--releasever RELEASEVER] [--setopt SETOPTS] [--skip-broken] [-h] [--allowerasing] [-b] [-C] [-d [debug level]] [--debugsolver] [--showduplicates] [-e ERRORLEVEL] [--obsoletes] [--rpmverbosity [debug level name]] [-y] [--assumeno] [--enablerepo [repo]] [--disablerepo [repo] | --repo [repo]] [-x [package]] [--disableexcludes [repo]] [--repofrompath [repo,path]] [--nogpgcheck] [--color COLOR] [--refresh] [-4] [-6] [--downloadonly] [--bugfix] [--enhancement] [--newpackage] [--security] [--advisory ADVISORY] [--bzs BUGZILLA] [--cves CVES] [--sec-severity {Critical,Important,Moderate,Low}] [--arch ARCH] [-f FILE [FILE ...]] [--whatprovides REQ] [--whatrequires REQ] [--whatrecommends REQ] [--whatenhances REQ] [--whatsuggests REQ] [--whatsupplements REQ] [--alldeps | --exactdeps] [--deplist] [--querytags] [--resolve] [--tree] [--srpm] [--latest-limit LATEST_LIMIT] [-i | -l | -s | --qf QUERYFORMAT] [--duplicates | --installonly | --unsatisfied] [--conflicts | --enhances | --provides | --recommends | --requires | --requires-pre | --suggests | --supplements] [--available] [--installed | --extras | --upgrades | --unneeded] [--recent] [key [key ...]] Command line error: argument --latest-limit: expected one argument This worked in Fedora 25.
what if you remove `-1` and replace it with `1`? We had to break some things in DNF 2.0...
(In reply to Igor Gnatenko from comment #1) > what if you remove `-1` and replace it with `1`? > > We had to break some things in DNF 2.0... 1 works as expected, but that's the opposite of what I need.
Igor, any update on this? I care about this feature enough that I might look into the issue myself, just let me know if this would help.
The problem is that -1 is treated as a separate parameter, not as a value for --latest-limit. I looked into dnf/cli/option_parser.py for a few minutes and there is -4 and -6 which have a meaning, but it's not immediately obvious how -1 is handled.
*** This bug has been marked as a duplicate of bug 1446641 ***