Is it appropriate to use $1 in %post and %postun to determine install/update vs. remove.
The packages I've built have some different behavior based on whether it is being upgraded or removed. I determined from sparse documentation that $1 represents the remaining instances of the package at the completion of the current operation.
$1 = 0 (erase)
$1 = 1 (erase phase of upgrade/ install)
$1 = 2 (install phase of upgrade)
I've always thought that it would be nice to have these as macros so that you don't have to remember what each numeric code stands for.
-- Sincerely,
David Walluck <david@xxxxxxxxxxxxxxxxxx>
Attachment:
signature.asc
Description: OpenPGP digital signature