Request for review: perl-Number-Compare
Paul Howarth
paul at city-fan.org
Fri Jul 1 12:39:22 UTC 2005
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.
More information about the fedora-extras-list
mailing list