From: Kyungjik Min <[email protected]> ROOTFS_BOOTSTRAP_INSTALL in image.bbclass unconditionally stages run-postinsts into every image. When no delayed postinsts remain, _uninstall_unneeded() is supposed to remove it again, but the removal call used the bare "run-postinsts" package name without applying MLPREFIX.
On a multilib image (e.g. lib32-core-image-minimal), the package that is actually installed is lib32-run-postinsts, so the unprefixed removal silently matches nothing and run-postinsts leaks into the final image manifest, along with its now-pointless init script / systemd unit. Expand MLPREFIX before removing the package, matching the pattern already used elsewhere in oe-core (e.g. oe/package.py) for package-name lookups that need to work across multilib variants. Signed-off-by: Kyungjik Min <[email protected]> Signed-off-by: Mathieu Dubois-Briand <[email protected]> Signed-off-by: Richard Purdie <[email protected]> (cherry picked from commit dfa5673907bdc5211671ecdfce8ab1fb332eae48) Signed-off-by: Yoann Congal <[email protected]> --- meta/lib/oe/rootfs.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py index 7ef7e71f9e1..3504762b7ea 100644 --- a/meta/lib/oe/rootfs.py +++ b/meta/lib/oe/rootfs.py @@ -267,7 +267,8 @@ class Rootfs(object, metaclass=ABCMeta): delayed_postinsts = self._get_delayed_postinsts() if delayed_postinsts is None: if os.path.exists(self.d.expand("${IMAGE_ROOTFS}${sysconfdir}/init.d/run-postinsts")) or os.path.exists(self.d.expand("${IMAGE_ROOTFS}${systemd_system_unitdir}/run-postinsts.service")): - self.pm.remove(["run-postinsts"]) + mlprefix = self.d.getVar('MLPREFIX') or "" + self.pm.remove([mlprefix + "run-postinsts"]) image_rorfs = bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", True, False, self.d) and \
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#246095): https://lists.openembedded.org/g/openembedded-core/message/246095 Mute This Topic: https://lists.openembedded.org/mt/121305572/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
