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
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
*** This bug has been marked as a duplicate of 124016 ***