image tools ext. class defines ISAR_CROSS_COMPILE, if missing

Message ID CAJGKYO76qD60FyRTJGxuAy0etn1gWaGUAghFnrcC5i-X_NV2dw@mail.gmail.com
State Rejected, archived
Headers show
Series image tools ext. class defines ISAR_CROSS_COMPILE, if missing | expand

Commit Message

Roberto A. Foglietta Jan. 4, 2023, 2:39 a.m. UTC
image tools extension class defines ISAR_CROSS_COMPILE = 0, if missing

The variable ISAR_CROSS_COMPILE might not be initialised in the image
tools extention class thus the project fail to build. This sets the default,
if missing.

Signed-off-by: Roberto A. Foglietta <roberto.foglietta@gmail.com>
---
 meta/classes/image-tools-extension.bbclass | 2 ++
 1 file changed, 2 insertions(+)

+++ b/meta/classes/image-tools-extension.bbclass

https://github.com/ilbers/isar/commit/641520428a75cc6c23b7fbe661292f12dd2f09b7

Comments

Henning Schild Jan. 4, 2023, 8:26 a.m. UTC | #1
Am Wed, 4 Jan 2023 03:39:48 +0100
schrieb "Roberto A. Foglietta" <roberto.foglietta@gmail.com>:

> image tools extension class defines ISAR_CROSS_COMPILE = 0, if missing
> 
> The variable ISAR_CROSS_COMPILE might not be initialised in the image
> tools extention class thus the project fail to build. This sets the
> default, if missing.

How exactly would the build fail and can you repro that on isar next?

My guess is that we might want to find a more central place. We do have
the default in the local.conf sample but layers usually do not use
that. Maybe the bitbake.conf could be an option, or all code that deals
with the variable should be written in a way that it will also work if
the variable is not set.

Henning

> 
> Signed-off-by: Roberto A. Foglietta <roberto.foglietta@gmail.com>
> ---
>  meta/classes/image-tools-extension.bbclass | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/meta/classes/image-tools-extension.bbclass
> b/meta/classes/image-tools-extension.bbclass
> index b571985..48a93c8 100644
> --- a/meta/classes/image-tools-extension.bbclass
> +++ b/meta/classes/image-tools-extension.bbclass
> 
> https://github.com/ilbers/isar/commit/641520428a75cc6c23b7fbe661292f12dd2f09b7
>

Patch

From 641520428a75cc6c23b7fbe661292f12dd2f09b7 Mon Sep 17 00:00:00 2001
From: "Roberto A. Foglietta" <roberto.foglietta@gmail.com>
Date: Wed, 4 Jan 2023 03:31:38 +0100
Subject: [PATCH] image tools ext. class defines ISAR_CROSS_COMPILE, if missing

image tools extension class defines ISAR_CROSS_COMPILE = 0, if missing

The variable ISAR_CROSS_COMPILE might not be initialised in the image
tools extention class thus the project fail to build. This sets the default,
if missing.

Signed-off-by: Roberto A. Foglietta <roberto.foglietta@gmail.com>
---
 meta/classes/image-tools-extension.bbclass | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/classes/image-tools-extension.bbclass b/meta/classes/image-tools-extension.bbclass
index b571985..48a93c8 100644
--- a/meta/classes/image-tools-extension.bbclass
+++ b/meta/classes/image-tools-extension.bbclass
@@ -11,6 +11,8 @@  IMAGER_INSTALL ??= ""
 IMAGER_BUILD_DEPS ??= ""
 DEPENDS += "${IMAGER_BUILD_DEPS}"
 
+ISAR_CROSS_COMPILE ?= "0"
+
 IMAGER_SCHROOT_SESSION_ID = "isar-imager-${SCHROOT_USER}-${PN}-${MACHINE}-${ISAR_BUILD_UUID}"
 
 do_install_imager_deps[depends] = "${SCHROOT_DEP} isar-apt:do_cache_config"
-- 
2.34.1