From c92f9fa875656bd4950919c1388620caeb6eaf46 Mon Sep 17 00:00:00 2001
From: Robert Drab <robert.drab@huawei.com>
Date: Thu, 7 Apr 2022 15:43:36 +0200
Subject: [PATCH] gn_base.bbclass: Check GN_TARGET_ARCH_NAME being resolved to
 empty string

Currently only the case where GN_TARGET_ARCH_NAME variable is undefined was
caught. The variable defined as an empty string would bypass the check.

Signed-off-by: Robert Drab <robert.drab@huawei.com>
---
 meta-oniro-staging/classes/gn_base.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-oniro-staging/classes/gn_base.bbclass b/meta-oniro-staging/classes/gn_base.bbclass
index 17166567..6f0c945a 100644
--- a/meta-oniro-staging/classes/gn_base.bbclass
+++ b/meta-oniro-staging/classes/gn_base.bbclass
@@ -82,7 +82,7 @@ def gn_target_arch_name(d):
     """Returns a GN architecture name corresponding to the target machine's
     architecture."""
     name = d.getVar("GN_TARGET_ARCH_NAME")
-    if name is None:
+    if not name:
         bb.fatal('Unsupported target architecture. A valid override for the '
                  'GN_TARGET_ARCH_NAME variable could not be found.')
     return name
-- 
GitLab