On 04/17/2011 10:12 AM, Michael Schwendt wrote:
$1>=1 for %postun would not be well-defined, btw.
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.