Skip steps in uninstall scripts if just an update

Jos Vos jos at xos.nl
Fri Jun 17 18:20:08 UTC 2011


On Fri, Jun 17, 2011 at 02:15:46PM -0400, Daniel Neuberger wrote:

> Is there any way to tell in your uninstall scripts whether the RPM is
> truly being uninstalled or just updated?

When the RPM is being updated, $1 of the script is 1.
When the RPM is really uninstalled, $1 of the script is 0.

(This is the simplified explanation, when more instances of a package
can be installed, like "kernel", the values are different...)

-- 
--    Jos Vos <jos at xos.nl>
--    X/OS Experts in Open Systems BV   |   Phone: +31 20 6938364
--    Amsterdam, The Netherlands        |     Fax: +31 20 6948204


More information about the Rpm-list mailing list