meta/classes/crossvars: use variable instead of getting value via d.getVar

Message ID 20250117102737.259735-1-srinuvasan.a@siemens.com
State New
Headers show
Series meta/classes/crossvars: use variable instead of getting value via d.getVar | expand

Commit Message

srinuvasan.a Jan. 17, 2025, 10:27 a.m. UTC
From: Srinuvasan A <srinuvasan.a@siemens.com>

Already we are getting COMPAT_DISTRO_ARCH value in compat_arch variable,
try to use the variable wherever it is applicable.

Signed-off-by: Srinuvasan A <srinuvasan.a@siemens.com>
---
 meta/classes/crossvars.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jan Kiszka Jan. 17, 2025, 11:10 a.m. UTC | #1
On 17.01.25 11:27, srinuvasan.a via isar-users wrote:
> From: Srinuvasan A <srinuvasan.a@siemens.com>
> 
> Already we are getting COMPAT_DISTRO_ARCH value in compat_arch variable,
> try to use the variable wherever it is applicable.
> 
> Signed-off-by: Srinuvasan A <srinuvasan.a@siemens.com>
> ---
>  meta/classes/crossvars.bbclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/classes/crossvars.bbclass b/meta/classes/crossvars.bbclass
> index 1a88d457..0a135a91 100644
> --- a/meta/classes/crossvars.bbclass
> +++ b/meta/classes/crossvars.bbclass
> @@ -38,6 +38,6 @@ python __anonymous() {
>      d.setVar('SCHROOT_DIR', schroot_dir + flavor_suffix)
>      d.setVar('SCHROOT_DEP', sbuild_dep)
>      if isar_can_build_compat(d):
> -        sdk_toolchain += " crossbuild-essential-" + d.getVar('COMPAT_DISTRO_ARCH')
> +        sdk_toolchain += " crossbuild-essential-" + compat_arch
>      d.setVar('SDK_TOOLCHAIN', sdk_toolchain)
>  }

Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>

Thanks,
Jan

Patch

diff --git a/meta/classes/crossvars.bbclass b/meta/classes/crossvars.bbclass
index 1a88d457..0a135a91 100644
--- a/meta/classes/crossvars.bbclass
+++ b/meta/classes/crossvars.bbclass
@@ -38,6 +38,6 @@  python __anonymous() {
     d.setVar('SCHROOT_DIR', schroot_dir + flavor_suffix)
     d.setVar('SCHROOT_DEP', sbuild_dep)
     if isar_can_build_compat(d):
-        sdk_toolchain += " crossbuild-essential-" + d.getVar('COMPAT_DISTRO_ARCH')
+        sdk_toolchain += " crossbuild-essential-" + compat_arch
     d.setVar('SDK_TOOLCHAIN', sdk_toolchain)
 }