Bug 1265025 - "dnf repoquery" thinks that --repo is the --repofrompath option
Summary: "dnf repoquery" thinks that --repo is the --repofrompath option
Keywords:
Status: CLOSED DUPLICATE of bug 1260986
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf-plugins-core
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-21 23:29 UTC by Corey Ashford
Modified: 2015-09-22 07:01 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-09-22 07:01:49 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Corey Ashford 2015-09-21 23:29:49 UTC
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 07:01:49 UTC
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.