Description of problem: The release notes for 0.1.7 state that --repoid has been changed to --repo to make usage consistent (http://dnf-plugins-core.readthedocs.org/en/latest/release_notes.html?#id8) However, using "--repo" results in an error while using the old (and now deprecated) "--repoid" works properly. Version-Release number of selected component (if applicable): At least the most recent version (as of now, 0.1.15) has this problem. How reproducible: 100% of the time Steps to Reproduce: 1. Run the following command: dnf repoquery --quiet --repo=updates --queryformat='%{name} - %{repoid}' bash Actual results: usage: dnf [--allowerasing] [-b] [-C] [-c [config file]] [-d [debug level]] [--debugsolver] [--showduplicates] [-e ERRORLEVEL] [--rpmverbosity [debug level name]] [-q] [-v] [-y] [--assumeno] [--version] [--installroot [path]] [--enablerepo [repo]] [--disablerepo [repo]] [-x [package]] [--disableexcludes [repo]] [--repofrompath [repo,path]] [--noplugins] [--nogpgcheck] [--disableplugin [plugin]] [--color COLOR] [--releasever RELEASEVER] [--setopt SETOPTS] [--refresh] [-4] [-6] [--downloadonly] [-h] Command line error: argument --repofrompath: bad format: updates Expected results: bash - updates Additional info: As mentioned above, using --repoid works properly: % dnf repoquery --quiet --repoid=updates --queryformat='%{name} - %{repoid}' bash bash - updates
I've found the issue. This is getting caught up in dnf's own argument parsing before it ever reaches the repoquery plugin. I dug into the source code for argparse in the Python stdlib, and found this gem: for option_string in self._option_string_actions: if option_string.startswith(option_prefix): action = self._option_string_actions[option_string] tup = action, option_string, explicit_arg result.append(tup) (See https://hg.python.org/releases/2.7.11/file/tip/Lib/argparse.py#l2156) So, what's happening is that the repoquery plugin has a "--repo" argument, but because of this loose matching in argparse.py, it is being matched to "--repofrompat" from dnf proper.
*** This bug has been marked as a duplicate of bug 1260986 ***