Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 234601 - rpm -q $PACKAGE.$ARCH fails too silently
Summary: rpm -q $PACKAGE.$ARCH fails too silently
Keywords:
Status: CLOSED DUPLICATE of bug 124016
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 6
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Paul Nasrat
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-03-30 14:52 UTC by Ben Slusky
Modified: 2007-11-30 22:12 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-06-11 14:32:50 UTC


Attachments (Terms of Use)

Description Ben Slusky 2007-03-30 14:52:50 UTC
Description of problem:

"rpm -q $PACKAGE.$ARCH" should print "package $PACKAGE.$ARCH is not installed"
and exit with status 1 if $PACKAGE.$ARCH is not installed. But if
$PACKAGE.$ARCH2 is installed for some $ARCH2 != $ARCH, it prints nothing and
exits with status 0 instead.


Version-Release number of selected component (if applicable):

rpm-4.4.2-32 and earlier versions (tested on FC6, FC5, and CentOS4)


How reproducible:

Always.


Steps to Reproduce:

I observed this problem on x86_64 trying to query i386 packages from a shell
script, but it can be reproduced using any $ARCH, including noarch:

1. rpm -q fedora-release ; echo $?
2. rpm -q fedora-release.noarch ; echo $?
3. rpm -q fedora-release.i386 ; echo $?
4. rpm -q this-pkg-doesnt-exist-wtf ; echo $?
5. rpm -q this-pkg-doesnt-exist-wtf.i386 ; echo $?


Actual results:

fedora-release-6-4
0
fedora-release-6-4
0
0
package this-pkg-doesnt-exist-wtf is not installed
1
package this-pkg-doesnt-exist-wtf.i386 is not installed
1


Expected results:

fedora-release-6-4
0
fedora-release-6-4
0
package fedora-release.i386 is not installed
1
package this-pkg-doesnt-exist-wtf is not installed
1
package this-pkg-doesnt-exist-wtf.i386 is not installed
1

Comment 1 Jeff Johnson 2007-03-30 19:43:33 UTC
rpm4-.4.9 behavior (since rpm-4.4.7 iirc):

+ rpm -q fedora-release
fedora-release-6.92-1.noarch
+ echo 0
0
+ rpm -q fedora-release.noarch
fedora-release-6.92-1.noarch
+ echo 0
0
+ rpm -q fedora-release.i386
package fedora-release.i386 is not installed
+ echo 1
1
+ rpm -q this-pkg-doesnt-exist-wtf
package this-pkg-doesnt-exist-wtf is not installed
+ echo 1
1
+ rpm -q this-pkg-doesnt-exist-wtf.i386
package this-pkg-doesnt-exist-wtf.i386 is not installed
+ echo 1
1
[jbj@jack rpm44]$ rpm --version
RPM version 4.4.9

UPSTREAM

Comment 2 Panu Matilainen 2007-06-11 14:32:50 UTC

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


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