Bug 30650 - Querying a specfile doesn't work properly
Querying a specfile doesn't work properly
Status: CLOSED DUPLICATE of bug 27589
Product: Red Hat Linux
Classification: Retired
Component: rpm-build (Show other bugs)
7.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-03-05 10:39 EST by Peter Bowen
Modified: 2007-04-18 12:31 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-03-05 10:39:41 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Peter Bowen 2001-03-05 10:39:32 EST
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 11:31:38 EST
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 17:41:07 EST
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 17:49:17 EST
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.