Bug 132011

Summary: rpm arch-specific query output is inconsistant
Product: Red Hat Enterprise Linux 3 Reporter: Joshua Jensen <joshua>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED WONTFIX QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: nobody+pnasrat
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: 2004-09-08 01:01:50 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 Joshua Jensen 2004-09-07 20:59:29 UTC
Description of problem:

#I have one kernel package installed
[jjensen@asic-amd32 jjensen]$ rpm -q kernel --qf '%{name}\t%{arch}\n'
kernel  x86_64

#I ask about a non-existant kernel
[jjensen@asic-amd32 jjensen]$ rpm -ql kernel.i789
package kernel.i789 is not installed

#I ask about another non-existant kernel
[jjensen@asic-amd32 jjensen]$ rpm -ql kernel.i386
(nothing showing for an error)

Isn't that inconsistant?  I can't get any error messages for the query
of a non-existant package.

Furthermore, rpm isn't even throwing an error code:

[jjensen@asic-amd32 jjensen]$ rpm -ql kernel.i386 &&  echo xyz
xyz



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

rpm-4.2.1-4.4

Comment 1 Jeff Johnson 2004-09-08 01:01:50 UTC
rpm trims known tokens from the tail of the arg iff recognised.

The string ".i386" is recognised, and hence trimmed.

The string ".i789" is not recognized, and hence not trimmed.

Retrofitting an .arch marker can/will collide with, say, a
package named "kernel.i386".

Don't do that is about all I can suggest. There are no easy answers
to retrofiiting new, multilib peculier, token parsers.