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.
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.