Re: using $1 to test for updates

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

 



Christoph Doerbeck a242369 wrote:

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


[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux