Bug 59948 - rpmbuild doesn't behave consistently when called with/without --target option
rpmbuild doesn't behave consistently when called with/without --target option
Status: CLOSED UPSTREAM
Product: Red Hat Linux
Classification: Retired
Component: rpm-build (Show other bugs)
7.2
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-02-15 11:00 EST by Sergey Ostrovsky
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-09-29 17:38:39 EDT
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 Sergey Ostrovsky 2002-02-15 11:00:02 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.73 [en] (X11; I; SunOS 5.7 sun4u)

Description of problem:
rpmbuild doesn't save macro environment when called with/without --target option

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


How reproducible:
Always

Steps to Reproduce:
Test case:

~/.rpmmacros

  %put_in_bag                                  \ 
      %global bag %{?bag:%{bag} }%{1}          \ 
  %{nil} 

<some>.spec

  %{echo:<=== bag is %{?bag:%{bag}}%{!?bag:not defined} ===>} 

( insert this line somewhere in an arbitrary .spec file )

Run:
  rpmbuild -bp --nodeps --eval "%put_in_bag foo" <some>.spec 2>&1

Output:
<=== bag is foo ===>

Now run
  rpmbuild -bp --nodeps --eval "%put_in_bag foo" --target=i686 <some>.spec 2>&1
( the particular arch used in --target doesn't actually matter )

Output:
<=== bag is not defined ===>

So, rpmbuild does not save macro environment when called with --target.
That's how rpm-4.0.4/build.c:build() implemented anyway.


Additional info:

I need the macro environment to be saved ( or rather re-expanded for every
target
in --target list ), because I wrote and am using set of macros which pass
autoconf parameters to %configure.  These macros generate definitions
that need to be kept in the macro environment.
Comment 1 Bill Nottingham 2005-09-29 17:38:39 EDT
Closing bugs on older, no longer supported, releases. Apologies for any lack of
response.

For RPM issues, please try a current release such as Fedora Core 4; if bugs
persist, please open a new issue.

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