]> code.ossystems Code Review - openembedded-core.git/commit
classes/package_rpm: disable uninstall scripts for upgrades
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Wed, 9 Nov 2011 11:12:08 +0000 (11:12 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 30 Jan 2012 16:27:13 +0000 (16:27 +0000)
commit6e66ecd201760fe418a9884e3605b88a68208776
tree8c2b0ee1edcd7bf6723efe67a66f23b9fe0c80ff
parentd83e4ac25cca788d2b102c2072ccb367c0cab284
classes/package_rpm: disable uninstall scripts for upgrades

Our current assumption (based on the behaviour of opkg) when writing
recipes is that prerm and postrm do not get called during an upgrade.
When using rpm however, these are mapped to the rpm "preun" and "postun"
events which occur after postinst for upgrades, and when these contain
removal type operations (such as update-alternatives --remove) this
causes problems.

This patch wraps each preun and postun script for rpm in a check that
determines whether or not the script is being called during an upgrade,
and skips the entire script if it is, which mimics the behaviour of opkg
under the same conditions.

Fixes [YOCTO #1760]

(From OE-Core rev: 1d3f37dc9a43ba6d6beb7b4530c077f239032b99)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/package_rpm.bbclass