RPM Community Forums

Mailing List Message of <rpm-devel>

Re: noarch sub-packages

From: Jeff Johnson <n3npq@mac.com>
Date: Mon 16 Jun 2008 - 08:22:45 CEST
Message-id: <1E331C14-5E24-4B3C-A83F-7B80D3137D62@mac.com>

On Jun 16, 2008, at 2:08 AM, Alexey Tourbin wrote:

> On Mon, Jun 16, 2008 at 01:57:13AM -0400, Jeff Johnson wrote:
>>> It looks like you cannot specify "BuildArch: %_target_cpu" in  
>>> toplevel
>>> package.
>>
>> Ah, I have a reproducer for the flaw now, fixing todo++.
>
> I believe there's an easier way to introduce noarch subpackages
> (i.e. without explicit spec->toplevel and pkg->noarch bookkeeping).
> You can simply check for (pkg == spec->packages).
> http://git.altlinux.org/people/at/packages/rpm.git? 
> a=commitdiff;h=3ad2b101

That looks mostly sane, but I need to actually try the patch. The extra
recursion when toplevel BuildArch: is parsed, which has the rather
dramatic side effect of abandoning and restarting the parse with  
associated
reinitialization, also ends up using a new spec pointer. So your logic
may work, but I can't tell without trying.

Note that the real flaw with
     BuildArch: %{_target_cpu}
is establishing whether the expansion occurs before or after
macros are reinitialized, there are actually 2 possible values
that %{_target_cpu} might have.

73 de Jeff
Received on Mon Jun 16 08:24:01 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.