]> 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>
Wed, 9 Nov 2011 14:58:14 +0000 (14:58 +0000)
commit1d3f37dc9a43ba6d6beb7b4530c077f239032b99
treec4ac96c819f627dd5d2e9215dd7f6e3fe2be33c1
parent25fae81538a92e15eab3fc169ebce44505f67839
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]

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
meta/classes/package_rpm.bbclass