RPM Community Forums

Mailing List Message of <rpm-devel>

%clean replace ??

From: Olivier Thauvin <nanardon@nanardon.zarb.org>
Date: Sat 09 Jun 2007 - 12:36:58 CEST
Message-Id: <200706091237.03985.nanardon@nanardon.zarb.org>
According comment and code in build/parseBuildInstallClean.c the %clean 
section is no longer use and replace by a direct "rm -fr %buildroot".

I am not sure a so direct replacement is a good idea:

+ rm -rf /home/users/olivier/RPM/tmp//munin-root
(quick translation from french) Can't chdir in foo, perm denied...

To avoid this issue, I'd rather suggest to perform "rm -fr %buildroot" only 
if %clean section is missing, or adding the rm after %clean, in my 
case %clean is:

%clean
chmod u+rX -R $RPM_BUILD_ROOT
rm -rf $RPM_BUILD_ROOT

Also, instead performing this rm during %install, why not simply run %clean 
instead before when at %install step (aka %install call %clean).

WDYT ?


Received on Sat Jun 9 12:37:06 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.