Bug 189930

Summary: RPM has a very low iq
Product: [Fedora] Fedora Reporter: Christian Boltz <rpmbug>
Component: rpmAssignee: Paul Nasrat <nobody+pnasrat>
Status: CLOSED NOTABUG QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-04-25 21:12:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Christian Boltz 2006-04-25 20:35:37 UTC
(I hope this is the correct place to report a bug in RPM, even if I use a SUSE 
Linux system ;-)  - I was asked to report this upstream.)

Description of problem:

# rpm -qi rpm
Name        : rpm          Relocations: (not relocatable)
Version     : 4.4.2        Vendor: SUSE LINUX Products GmbH, Nuernberg, Germany
[...]

So far, everything works as expected. But...

# rpm -iq rpm
rpm-4.4.2-37

... it seems RPM has a very low IQ ;-) and fails if the parameter order
changed. I would expect the verbose -i output here also.

It seems not all parameters fail with changed order, for example both "rpm -qf
file" and "rpm -fq file" work.

Version-Release number of selected component (if applicable):
rpm-4.4.2-37 - SUSE Linux 10.1 RC 2

How reproducible:
always

Steps to Reproduce:
1. run   rpm -iq rpm   (or any other packagename)
2. that's it already ;-)
  
Actual results:
only prints package name and version like   rpm -q rpm

Expected results:
verbose package information like   rpm -qi rpm

Comment 1 Michael Jennings (KainX) 2006-04-25 20:52:54 UTC
I hope you're kidding.  The "-i" option to rpm is the "install" option.


Comment 2 Paul Nasrat 2006-04-25 21:12:41 UTC
RPM has major modes eg ('i' install, 'q' query, rpmbuild 'b' build) some of
those take additional mode information - such as -qi (info), -qf (queryfile),
-bp (build and exit after %prep).

Comment 3 Jeff Johnson 2006-04-26 08:51:48 UTC
For hysterical reasons, there are 3 uses of -i in rpm:
    1) --install, -i as a major mode
    2) --info,-i as a modifier for the query -qi
    3) -i for build mode -bi

Both 2) and 3) are implemented as a single dash long option, as if "-qi" or "-bi"
were invoked as "--qi" or "--bi" where the order of the letters is not permutable.