Re: Multi-arch RPM at once

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Michael Jennings wrote:

On Tuesday, 01 February 2005, at 14:20:36 (+0100),
Toralf Lund wrote:



Nice. It's new to me as well that you can do this. But the
functionality is perhaps not documented anywhere?



I forget how I learned of it. Most likely I discovered it by
accident, or I may have gotten it from HJ Lu. (We worked together at
the time.)


Yeah, I guess this is one of the things that it might suddenly occur to you to try, if you use the --target option - which I generally don't; I usually build for the default architecture or set an alternative one once and for all via BuildArch:

A couple of questions related to this:

1. Can I get the same effect via rpm tag setup or macro definitions?
I mean, can I do
BuildArch: i386,i686,x86_64
or similar in order to get multiple builds even when not using
--target? (I don't think BuildArch works that way, but a different
tag, perhaps? Or some kind of macro trickery?)
2. Is there any way to tell the build invocations apart, besides
testing the architecture? What I have in mind is something like
%if %_now_executing_build_script_for_the_first_target_listed
doSomething
%else
doSomethingElseEntirely
%endif



The comma-separated syntax for --target causes essentially the same effect as a shell loop like this:

for i in i386 i686 x86_64 ; do rpmbuild --target=$i ; done

So, as you would expect in the single-arch case, standard
%ifarch/%ifnarch semantics work correctly in the multi-arch case as
well.

That's what I though. What I'm wondering about, though, is if it's possible to tell rpmbuild via the spec file to re-exec itself that way, and also if it passes additional --define's (or their equivalent) based on the current position in the target list, or something. I can't find anything looking like that in %dump, however...

- Toralf


_______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux