On Jun 11, 2007, at 10:44 AM, Mark Hatle wrote:
> Olivier Thauvin wrote:
>> Also, instead performing this rm during %install, why not simply
>> run %clean
>> instead before when at %install step (aka %install call %clean).
>>
>> WDYT ?
>
> Just an fyi, for some various reasons, we occasionally need the %
> install
> section to NOT clean the buildroot.. This is because we're only use
> the
> spec file to handle a few minor issues (like the automatic debuginfo
> generation), while other components of our build environment are
> compiling and copying the files into the buildroot.
>
There's a means to change the automagic by re-defining a macro.
Here is the mechanism that injects "rm -rf %{buildroot}" immediately
after %install:
%__spec_install_pre %{___build_pre}\
%{?buildroot:%{__rm} -rf '%{buildroot}'}
The expansion of %{___build_pre} maps macro values into envvars.
73 de Jeff
Received on Mon Jun 11 22:21:06 2007