Bug 1265025 - "dnf repoquery" thinks that --repo is the --repofrompath option
"dnf repoquery" thinks that --repo is the --repofrompath option
Status: CLOSED DUPLICATE of bug 1260986
Product: Fedora
Classification: Fedora
Component: dnf-plugins-core (Show other bugs)
22
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: packaging-team-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-21 19:29 EDT by Corey Ashford
Modified: 2015-09-22 03:01 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-09-22 03:01:49 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Corey Ashford 2015-09-21 19:29:49 EDT
Description of problem:


Version-Release number of selected component (if applicable):
dnf-plugins-core-0.1.11-1.fc22.noarch


How reproducible:
100%

Steps to Reproduce:
1.Run this command:
dnf repoquery --repofrompath foo,ftp://mirror.web-ster.com/fedora/releases/22/Everything/x86_64/os/ --repo foo

2. Observe the usage error in the output


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] [-h]
Command line error: argument --repofrompath: bad format: foo


Expected results:
A listing of all of the packages in the "foo" repository, and only in the "foo" repository


Additional info:
If I eliminate the --repo option, I no longer get an error about the --repofrompath option, but I get results from the default repos in addition to my "foo" repo.

My current work-around is to use the deprecated repoquery command.
Comment 1 Radek Holy 2015-09-22 03:01:49 EDT
Actually, it says "bad format: foo". In fact, DNF thinks that by "--repo" you mean "--repofrompath" again and it expects the correct format. This is a feature of the Python's argument parser [1]. This in combination with our problematic design of argument parsing process causes this error. We are working on it.

[1] https://docs.python.org/dev/library/argparse.html?highlight=argparse#prefix-matching

*** This bug has been marked as a duplicate of bug 1260986 ***

Note You need to log in before you can comment on or make changes to this bug.