From a22bdf729a2bdf6ea327540356763811758eea66 Mon Sep 17 00:00:00 2001 From: "Gassner, Tobias.ext" Date: Mon, 15 Jul 2024 08:35:11 +0200 Subject: rootfs: Ensure run-postinsts is not uninstalled for read-only-rootfs-delayed-postinsts This patch ensures that pkg_postinst_ontarget task is executed for read only rootfs when read-only-rootfs-delayed-postinsts is set as IMAGE_FEATURES. The issue was that run-postinsts could be uninstalled at the end of rootfs construction and that shouldn't happen for the delayed usecase. In addition to the fix, a test in meta/lib/oeqa/selftest/cases/overlayfs.py testing the fix has been implemented. (From OE-Core rev: 60f587475dda99eaa07848880058b69286b8900e) Signed-off-by: Gassner, Tobias.ext Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie --- meta/lib/oe/rootfs.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'meta/lib/oe/rootfs.py') diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py index 8cd48f9450..5abce4ad7d 100644 --- a/meta/lib/oe/rootfs.py +++ b/meta/lib/oe/rootfs.py @@ -269,7 +269,11 @@ class Rootfs(object, metaclass=ABCMeta): self.pm.remove(["run-postinsts"]) image_rorfs = bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", + True, False, self.d) and \ + not bb.utils.contains("IMAGE_FEATURES", + "read-only-rootfs-delayed-postinsts", True, False, self.d) + image_rorfs_force = self.d.getVar('FORCE_RO_REMOVE') if image_rorfs or image_rorfs_force == "1": -- cgit v1.2.3-54-g00ecf