public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: "mac@mcrowe.com" <mac@mcrowe.com>
To: Ross Burton <Ross.Burton@arm.com>
Cc: "openembedded-core@lists.openembedded.org"
	<openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core] [PATCH] multilib.bbclass: Filter ROOTFS_RO_UNNEEDED to fix uninstallation
Date: Fri, 31 Oct 2025 13:45:50 +0000	[thread overview]
Message-ID: <aQS9jgRk4RiR-8BZ@mcrowe.com> (raw)
In-Reply-To: <B79775E7-9442-4E1B-9F4E-A26353ADC746@arm.com>

Hi Ross,

On Wednesday 29 October 2025 at 16:12:06 +0000, Ross Burton wrote:
>> On 20 Oct 2025, at 17:03, Mike Crowe via lists.openembedded.org <mac=mcrowe.com@lists.openembedded.org> wrote:
>>> 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.
> 
> Would you be able to make a test case in oeqa to verify that this
> behaviour works as expected in the future, and doesn’t regress?

I've never written one before and I wasn't sure whether it should fit
inside one of the existing case files, but is this the sort of thing you
mean?

Subject: [PATCH] oe-selftest: Add test of read-only multilib image

This test confirms that the fix for ROOTFS_RO_UNNEEDED with multilib
images in 77c35362fb13c75145f9f999216b3d879ab18b77 don't regress.

diff --git a/meta/lib/oeqa/selftest/cases/multilib.py b/meta/lib/oeqa/selftest/cases/multilib.py
new file mode 100644
index 0000000000..67bfb37967
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/multilib.py
@@ -0,0 +1,32 @@
+#
+# Copyright OpenEmbedded Contributors
+#
+# SPDX-License-Identifier: MIT
+#
+
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import get_bb_var, bitbake, runCmd
+
+class MultiLib(OESelftestTestCase):
+
+    def test_read_only_multilib_image_lacks_run_postinsts(self):
+        """
+        Check that a read-only multilib image can be built and that image has had
+        ${MLPREFIX}run-postinsts correctly uninstalled.
+        """
+
+        config = """
+MACHINE = "qemuarm64"
+require conf/multilib.conf
+MULTILIBS = "multilib:lib32"
+DEFAULTTUNE:virtclass-multilib-lib32 = "armv7at-neon"
+IMAGE_FEATURES = "read-only-rootfs"
+"""
+        self.write_config(config)
+        bitbake('lib32-core-image-minimal')
+        deploy_dir_image = get_bb_var('DEPLOY_DIR_IMAGE')
+        manifest_lines = open(deploy_dir_image + "/lib32-core-image-minimal-qemuarm64.rootfs.manifest").readlines()
+
+        # lib32-run-postinsts should have been uninstalled since
+        # run-postinsts is in ROOTFS_RO_UNNEEDED.
+        self.assertEqual(list(filter(lambda l: "run-postinsts" in l, manifest_lines)), [])
--
2.39.5

Thanks.

Mike.


      reply	other threads:[~2025-10-31 13:45 UTC|newest]

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

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=aQS9jgRk4RiR-8BZ@mcrowe.com \
    --to=mac@mcrowe.com \
    --cc=Ross.Burton@arm.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