Bug 59948 - rpmbuild doesn't behave consistently when called with/without --target option
Summary: rpmbuild doesn't behave consistently when called with/without --target option
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm-build
Version: 7.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-02-15 16:00 UTC by Sergey Ostrovsky
Modified: 2008-05-01 15:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-09-29 21:38:39 UTC
Embargoed:


Attachments (Terms of Use)

Description Sergey Ostrovsky 2002-02-15 16:00:02 UTC
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 21:38:39 UTC
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.