using $1 to test for updates

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

 



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)

This has tested successfully, but I'd like to know if this is a dependable
test....

-christoph


_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[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