public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "'Andreas Naumann' via isar-users" <isar-users@googlegroups.com>
To: isar-users@googlegroups.com
Cc: Andreas Naumann <anaumann@emlix.com>
Subject: [PATCH 3/5] image: Do not inherit multiarch
Date: Wed,  1 Oct 2025 12:59:27 +0200	[thread overview]
Message-ID: <20251001105929.3731537-4-anaumann@emlix.com> (raw)
In-Reply-To: <20251001105929.3731537-1-anaumann@emlix.com>

Images don't need multiarch functionality. Remove the inheritance.

In order to keep the bb2deb conversion function in scope for the image class,
move it to rootfs, which it inherits from.

Signed-off-by: Andreas Naumann <anaumann@emlix.com>
---
 meta/classes/image.bbclass     |  1 -
 meta/classes/multiarch.bbclass | 16 ----------------
 meta/classes/rootfs.bbclass    | 16 ++++++++++++++++
 3 files changed, 16 insertions(+), 17 deletions(-)

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 57e66632..354ec85e 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -62,7 +62,6 @@ DEPENDS += "${IMAGE_INSTALL}"
 ISAR_RELEASE_CMD_DEFAULT = "git -C ${LAYERDIR_core} describe --tags --dirty --match 'v[0-9].[0-9]*'"
 ISAR_RELEASE_CMD ?= "${ISAR_RELEASE_CMD_DEFAULT}"
 
-inherit multiarch
 inherit essential
 
 ROOTFSDIR = "${IMAGE_ROOTFS}"
diff --git a/meta/classes/multiarch.bbclass b/meta/classes/multiarch.bbclass
index ae465aec..5b67d779 100644
--- a/meta/classes/multiarch.bbclass
+++ b/meta/classes/multiarch.bbclass
@@ -101,19 +101,3 @@ python multiarch_virtclass_handler() {
 }
 addhandler multiarch_virtclass_handler
 multiarch_virtclass_handler[eventmask] = "bb.event.RecipePreFinalise"
-
-# function to convert bitbake targets to installable debian packages,
-# e.g., "hello-compat" to "hello:i386".
-def isar_multiarch_packages(var, d):
-    bb_targets = (d.getVar(var) or '').split()
-    packages = []
-    compat_distro_arch = d.getVar('COMPAT_DISTRO_ARCH')
-    host_arch = d.getVar('HOST_ARCH')
-    for t in bb_targets:
-        if t.endswith('-compat') and compat_distro_arch is not None:
-            packages.append(t[:-len('-compat')] + ':' + compat_distro_arch)
-        elif t.endswith('-native'):
-            packages.append(t[:-len('-native')] + ':' + host_arch)
-        else:
-            packages.append(t)
-    return ' '.join(packages)
diff --git a/meta/classes/rootfs.bbclass b/meta/classes/rootfs.bbclass
index 53e60a81..f60be99c 100644
--- a/meta/classes/rootfs.bbclass
+++ b/meta/classes/rootfs.bbclass
@@ -632,3 +632,19 @@ python do_rootfs_install_setscene() {
     sstate_setscene(d)
 }
 addtask do_rootfs_install_setscene
+
+# function to convert bitbake targets to installable debian packages,
+# e.g., "hello-compat" to "hello:i386".
+def isar_multiarch_packages(var, d):
+    bb_targets = (d.getVar(var) or '').split()
+    packages = []
+    compat_distro_arch = d.getVar('COMPAT_DISTRO_ARCH')
+    host_arch = d.getVar('HOST_ARCH')
+    for t in bb_targets:
+        if t.endswith('-compat') and compat_distro_arch is not None:
+            packages.append(t[:-len('-compat')] + ':' + compat_distro_arch)
+        elif t.endswith('-native'):
+            packages.append(t[:-len('-native')] + ':' + host_arch)
+        else:
+            packages.append(t)
+    return ' '.join(packages)
-- 
2.43.0

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/20251001105929.3731537-4-anaumann%40emlix.com.

  parent reply	other threads:[~2025-10-01 10:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-01 10:59 [RFC 0/5] Improving multiarch support for arch-incompatible packages 'Andreas Naumann' via isar-users
2025-10-01 10:59 ` [PATCH 1/5] rootfs: Do not recursively deploy every dependent package 'Andreas Naumann' via isar-users
2025-10-01 10:59 ` [PATCH 2/5] multiarch: handle DPKG_ARCH=all case for transitive deps 'Andreas Naumann' via isar-users
2025-10-01 10:59 ` 'Andreas Naumann' via isar-users [this message]
2025-10-02 12:09   ` [PATCH 3/5] image: Do not inherit multiarch 'Jan Kiszka' via isar-users
2025-10-02 14:17     ` 'Andreas Naumann' via isar-users
2025-10-02 14:55       ` 'Jan Kiszka' via isar-users
2025-10-06  7:05         ` 'Andreas Naumann' via isar-users
2025-10-01 10:59 ` [PATCH 4/5] multiarch: Prevent providing incompatible native packages 'Andreas Naumann' via isar-users
2025-10-01 10:59 ` [PATCH 5/5] multiarch: Do not re-extend real -native recipes 'Andreas Naumann' via isar-users
2025-10-02 12:10 ` [RFC 0/5] Improving multiarch support for arch-incompatible packages 'Jan Kiszka' via isar-users

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=20251001105929.3731537-4-anaumann@emlix.com \
    --to=isar-users@googlegroups.com \
    --cc=anaumann@emlix.com \
    /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