[Fedora-packaging] Upgrade scriptlet

Ville Skyttä ville.skytta at iki.fi
Sun Apr 17 08:46:31 UTC 2011


On 04/17/2011 10:12 AM, Michael Schwendt wrote:

> $1>=1 for %postun would not be well-defined, btw.

How so?

> https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Syntax

By the way, there are two things that could be improved in that section:

1) Typo: s/package upgrade form/package upgrade from/

2) It notes that the arguments will vary with parallel installable
packages such as the kernel.  It would be good to note that in addition
to kernel this occurs also when multiple arch versions of the same
package is installed which is a common scenario on x86_64 systems, which
means simply testing for $1 to find out if something is being upgraded
or installed initially or removed may be dangerous, depending on the
case.  For example if you install foo.i686 first, then later foo.x86_64:
at the time foo.x86_64's %post runs, $1 will be 2 in it even if nothing
is actually being upgraded.


More information about the packaging mailing list