public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: mac@mcrowe.com
To: openembedded-core@lists.openembedded.org
Cc: Mike Crowe <mac@mcrowe.com>
Subject: [PATCH] multilib.bbclass: Filter ROOTFS_RO_UNNEEDED to fix uninstallation
Date: Mon, 20 Oct 2025 17:03:53 +0100	[thread overview]
Message-ID: <20251020160353.413127-1-mac@mcrowe.com> (raw)

From: Mike Crowe <mac@mcrowe.com>

When building an entire multilib image (e.g. lib32-core-image-minimal)
we need to ensure that the unneeded packages in ROOTFS_RO_UNNEEDED get
the multilib prefix applied before they are compared against the list of
installed packages inside Rootfs._uninstall_unneeded() to decide whether
they need to be installed.

Before this change with local.conf containing:

 MACHINE = qemuarm64
 require conf/multilib.conf
 MULTILIBS = "multilib:lib32"
 DEFAULTTUNE:virtclass-multilib-lib32 = "armv7at-neon"
 IMAGE_FEATURES = "read-only-rootfs"

running:
 bitbake lib32-core-image-minimal
 tar tavf tmp/deploy/images/qemuarm64/lib32-core-image-minimal-qemuarm64.rootfs.tar.zst|grep postinst

shows three files:
 -rwxr-xr-x 0/0              25 2018-03-09 12:34 ./etc/init.d/run-postinsts
 lrwxrwxrwx 0/0               0 2018-03-09 12:34 ./etc/rcS.d/S99run-postinsts -> ../init.d/run-postinsts
 -rwxr-xr-x 0/0            2153 2018-03-09 12:34 ./usr/sbin/run-postinsts

whereas with this change there are no matching files.

Signed-off-by: Mike Crowe <mac@mcrowe.com>
---
 meta/classes/multilib.bbclass | 1 +
 1 file changed, 1 insertion(+)

Rootfs._uninstall_unneeded can also try to uninstall run-postinsts
without using the multilib prefix right at the top. I could fix that
with d.expand("${MLPREFIX}run-postinsts") it feels wrong to sully the
generic code with something multilib specific. Advice welcome.

diff --git a/meta/classes/multilib.bbclass b/meta/classes/multilib.bbclass
index 677dbc854a..15056dac4d 100644
--- a/meta/classes/multilib.bbclass
+++ b/meta/classes/multilib.bbclass
@@ -116,6 +116,7 @@ python __anonymous () {
         clsextend = oe.classextend.ClassExtender(variant, prefixes, d)
         clsextend.set_filter("PACKAGE_INSTALL", deps=False)
         clsextend.set_filter("LINGUAS_INSTALL", deps=False)
+        clsextend.set_filter("ROOTFS_RO_UNNEEDED", deps=False)
         clsextend.set_filter("RDEPENDS", deps=True)
         pinstall = d.getVar("LINGUAS_INSTALL") + " " + d.getVar("PACKAGE_INSTALL")
         d.setVar("PACKAGE_INSTALL", pinstall)
-- 
2.39.5



             reply	other threads:[~2025-10-20 16:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-20 16:03 mac [this message]
2025-10-29 16:12 ` [OE-core] [PATCH] multilib.bbclass: Filter ROOTFS_RO_UNNEEDED to fix uninstallation Ross Burton
2025-10-31 13:45   ` mac

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251020160353.413127-1-mac@mcrowe.com \
    --to=mac@mcrowe.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox