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

[Fedora-packaging] Re: BuildRoot

On Tue, Jul 25, 2006 at 11:26:26PM +0300, Ville Skyttä wrote:
> Too bad it doesn't work very well, for "BuildArch: noarch" packages,
> %{buildroot} ends up ending with -noarch here as expected, but
> $RPM_BUILD_ROOT ends with -x86_64.

Hm, I tried it w/o the patch (e.g. no default %buildroot) and the
effects are even funnier:

+ echo '%{buildroot}'
+ echo

+ exit 0

%{buildroot} becomes literally "%{buildroot}" and $RPM_BUILD_ROOT
becomes "".

So there is finally a difference between the two beyond style -
usually $RPM_BUILD_ROOT is defined as %{buildroot} automagically
within rpm upon creation of the scriplets to run for %prep and so
on. But if a BuildRoot: tag is missing no such code is emitted and the
$RPM_BUILD_ROOT environment variable is never instantiated.

In that sense it is safer to use %{buildroot} all over as install
... %{buildroot}%{_bindir} resolves to a relative non-existant folder
while $RPM_BUILD_ROOT%{_bindir} resolves to /usr/bin on missing

But to come back to Ville's observation: It means that one shouldn't
mix %{buildroot} and $RPM_BUILD_ROOT in the same specfile, which
hopefully noone is doing.
Axel.Thimm at ATrpms.net

Attachment: pgpDccF4dXo99.pgp
Description: PGP signature

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