[elbe-devel] [PATCH v2 5/5] elbeproject: Check for value of sdkarch

Olivier Dion dion at linutronix.de
Sun Mar 15 22:12:15 CET 2020


When building an SDK, the sdkarch can be None and will result in the
following traceback:
--------------------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/cache/elbe/devel/elbepack/asyncworker.py", line 186, in execute
    skip_pbuild=self.skip_pbuilder)
  File "/var/cache/elbe/devel/elbepack/elbeproject.py", line 557, in build
    self.get_rpcaptcache())
  File "/var/cache/elbe/devel/elbepack/efilesystem.py", line 83, in extract_target
    copy_filelist(src, file_list, dst)
  File "/var/cache/elbe/devel/elbepack/efilesystem.py", line 40, in copy_filelist
    dst.fname(f)))
  File "/var/cache/elbe/devel/elbepack/shellhelper.py", line 41, in system
    raise CommandError(cmd, ret)
CommandError
--------------------------------------------------------------------------------

Signed-off-by: Olivier Dion <dion at linutronix.de>
---
 elbepack/elbeproject.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/elbepack/elbeproject.py b/elbepack/elbeproject.py
index b742fb9e..9c05561c 100644
--- a/elbepack/elbeproject.py
+++ b/elbepack/elbeproject.py
@@ -378,7 +378,9 @@ class ElbeProject (object):
                     host_pkglist.append(p.et.text.strip())
         else:
             try:
-                host_pkglist.append("g++-%s" % self.xml.defs["sdkarch"])
+                arch = self.xml.defs["sdkarch"]
+                if arch is not None:
+                    host_pkglist.append("g++-%s" % arch)
             except KeyError:
                 raise UnsupportedSDKException(triplet)
 
-- 
2.25.1




More information about the elbe-devel mailing list