Description of problem: When using rpmbuild --target=<target> --showrc, the output shows what the rpm macros would be without specifying --target=. I believe it makes more sense to evaluate the --target= parameter. Version-Release number of selected component (if applicable): all How reproducible: rpmbuild --showrc > output1 rpmbuild --target=i386-linux --showrc > output2 diff output1 output2 Actual results: Same.. Expected results: Different based on per arch macros Additional info: I will be attaching a patch we have used to solve this issue since RPM 4.1. It has been HEAVILY tested.
Created attachment 101842 [details] Patch that makes --target= apply before the --showrc in rpmbuild This patch has been applied and tested with MontaVista Linux since RPM 4.1. It seems to "work for us".
Comment on attachment 101842 [details] Patch that makes --target= apply before the --showrc in rpmbuild slight change to allow --eval to work.
Created attachment 102291 [details] Revised patch to support --showrc and --eval when --target= is used in rpmbuild Revised patch. Supports both --eval and --showrc operations to rpmbuild when --target= is selected.
This is almost correct, but does not handle multiple platforms after --target. Purty easy to just use the first target for --showrc instead.
This is still the case in rpm-4.4.1-22 in FC4
A slightly modified patch has been added to rpm cvs, will be in rpm-4.4.7 when released.