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

Re: Request for review: perl-Number-Compare



Michael Schwendt wrote:
On Fri, 01 Jul 2005 10:32:00 +0100, Paul Howarth wrote:


- I'd put %check after %install rather than after %clean, so that builds on rpm versions not supporting %check could still work.


Does order of spec sections matter? (I don't think so)

Current rpm versions run the %check scriptlet after %install, if %check is present.


Older rpm versions don't understand %check, and will barf when they come across it.

The standard idiom for working around this is to use:

%check || :

This causes old versions of rpm to ignore the fact that they don't understand %check and carry on whatever they were doing, which will be running the scriptlet immediately before %check. So if you want old versions of rpm to behave like new ones, you use this order:

%install
...
%check || :
...

If instead you have:

%install
...
%clean
...
%check || :
...

then old versions of rpm will run the %check scriptlet at the end of the %clean scriptlet, i.e. just after everything has been deleted. Not a good idea.

Paul.


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