Mailinglist Archive: opensuse-packaging (68 mails)
| < Previous | Next > |
Re: [opensuse-packaging] cleaning the buildroot correctly
- From: andreas.hanke@xxxxxxxxxxxxxx
- Date: Wed, 14 Feb 2007 22:46:12 +0100
- Message-id: <20070214214612.209180@xxxxxxx>
Hi,
> If you want to clean it, better do:
> %install
> rm -rf $RPM_BUILD_ROOT
> mkdir $RPM_BUILD_ROOT
> mkdir -p $RPM_BUILD_ROOT/usr ... or make install
Or even more trivial:
rm -rf $RPM_BUILD_ROOT/*
Also note that %clean is not the same as %install. It becomes increasingly popular these days to remove rm -rf $RPM_BUILD_ROOT from %clean.
Maybe some day rpm will make this obsolete, but right now it does not (yet) and other than within %install, doing this within %clean does _not_ open a race condition. Not doing this causes your package to leave stale tmp files behind, preventing other users from rebuilding the same package on the same machine.
Andreas Hanke
--
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-packaging+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-packaging+help@xxxxxxxxxxxx
> If you want to clean it, better do:
> %install
> rm -rf $RPM_BUILD_ROOT
> mkdir $RPM_BUILD_ROOT
> mkdir -p $RPM_BUILD_ROOT/usr ... or make install
Or even more trivial:
rm -rf $RPM_BUILD_ROOT/*
Also note that %clean is not the same as %install. It becomes increasingly popular these days to remove rm -rf $RPM_BUILD_ROOT from %clean.
Maybe some day rpm will make this obsolete, but right now it does not (yet) and other than within %install, doing this within %clean does _not_ open a race condition. Not doing this causes your package to leave stale tmp files behind, preventing other users from rebuilding the same package on the same machine.
Andreas Hanke
--
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-packaging+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-packaging+help@xxxxxxxxxxxx
| < Previous | Next > |