fix: improve check for availability of compat arch

Message ID 20230306071226.3165673-1-adriaan.schmidt@siemens.com
State Accepted, archived
Headers show
Series fix: improve check for availability of compat arch | expand

Commit Message

Schmidt, Adriaan March 6, 2023, 7:12 a.m. UTC
follow-up to 3aa4d3832ccb2271e850a8245cb45ad40e3da366

The check, whether compat can be built needs to also ensure that we
actually have a compat arch for our DISTRO_ARCH. There is a helper
function in the compat class for this now.

Signed-off-by: Adriaan Schmidt <adriaan.schmidt@siemens.com>

---
Sorry, I was slow to send an updated patch, rebasing the essential
packages feature onto v4 of the multiarch series.

Adriaan
---
 meta/classes/essential.bbclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Uladzimir Bely March 9, 2023, 5:44 a.m. UTC | #1
In the email from Monday, 6 March 2023 10:12:26 +03 user Adriaan Schmidt wrote:
> follow-up to 3aa4d3832ccb2271e850a8245cb45ad40e3da366
> 
> The check, whether compat can be built needs to also ensure that we
> actually have a compat arch for our DISTRO_ARCH. There is a helper
> function in the compat class for this now.
> 
> Signed-off-by: Adriaan Schmidt <adriaan.schmidt@siemens.com>
> 

Merged to next, thanks.

Patch

diff --git a/meta/classes/essential.bbclass b/meta/classes/essential.bbclass
index be98a76d..2ae31b38 100644
--- a/meta/classes/essential.bbclass
+++ b/meta/classes/essential.bbclass
@@ -3,9 +3,11 @@ 
 
 ISAR_REBUILD_ESSENTIAL_PKGS ?= ""
 
+inherit compat
+
 python() {
     isar_rebuild_essential_pkgs = (d.getVar('ISAR_REBUILD_ESSENTIAL_PKGS') or '').split()
-    build_compat = d.getVar('ISAR_ENABLE_COMPAT_ARCH') == "1"
+    build_compat = isar_can_build_compat(d)
     build_native = not d.getVar('DISTRO_ARCH') == d.getVar('HOST_ARCH')
 
     # construct list of essential packages that should be rebuilt: