Bug 30650 - Querying a specfile doesn't work properly
Summary: Querying a specfile doesn't work properly
Keywords:
Status: CLOSED DUPLICATE of bug 27589
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm-build
Version: 7.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-03-05 15:39 UTC by Peter Bowen
Modified: 2007-04-18 16:31 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-03-05 15:39:41 UTC
Embargoed:


Attachments (Terms of Use)

Description Peter Bowen 2001-03-05 15:39:32 UTC
If you do 

rpm --query --specfile foo.spec --queryformat  \
"%{NAME}\t %{EXCLUDEARCH}\t %{EXCLUSIVEARCH}\n"

where foo has an exclude arch option, rpm will show "(none)" for both
exclusive arch and excludearch on all packages.  I used php.spec from Red
Hat 7.0 as the test.  This occurs with the rpm distributed with RHL6.2, the
6.2 errata, 7.0, and wolverine.

Comment 1 Jeff Johnson 2001-03-05 16:31:38 UTC
This problem has the same root cause as #27859, as ExcludeArch: is part of a
buildRestrictions
header, not the parsed package header.

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

Comment 2 Peter Bowen 2001-03-05 22:41:07 UTC
Is there a  known work-around?  I understand that this is due to the recursive
nature of specfile parsing, but it seems like there should be some way to dump
the buildarch info.

Comment 3 Jeff Johnson 2001-03-05 22:49:17 UTC
Sure, grep is your friend. Try
	grep -i "^ExcludeArch:" php.spec
and variants thereof.


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