]> code.ossystems Code Review - openembedded-core.git/commit
rootfs.py: remove update-alternatives correctly
authorMikko Ylinen <mikko.ylinen@linux.intel.com>
Wed, 27 Sep 2017 08:08:14 +0000 (11:08 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 6 Oct 2017 11:03:31 +0000 (12:03 +0100)
commit0a8639593c11ef0cfb3a3a514b17e36318b8e8f2
treebb6b2a6594fbc26544d9e5abe7bcaf48e9ca383f
parente013cff66ec364738e5ccb085c1079507de66aaa
rootfs.py: remove update-alternatives correctly

With "read-only-rootfs" in IMAGE_FEATURES, packages in ROOTFS_RO_UNNEEDED
are removed when building the rootfs. The list of packages to remove is
passed to the package manager and the list is sorted so that
update-alternatives provider is the last entry. This is with the
assumption that the last entry on the list/command line is removed last.

However, it turns out rpm does not care about "last on the command
line" and update-alternatives provider is removed before other the
packages get to run their %preun scripts for update-alternatives.

This leaves broken alternative symlinks in rootfs.

The fix is to first remove all but update-alternatives provider and
after that update-alternatives provider in its own remove() call.

Signed-off-by: Mikko Ylinen <mikko.ylinen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/lib/oe/rootfs.py