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

Torben Hohn torben.hohn at linutronix.de
Thu Apr 2 12:15:03 CEST 2020


On Sun, Mar 15, 2020 at 05:12:15PM -0400, Olivier Dion wrote:
> 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
> --------------------------------------------------------------------------------

please have a look at: elbepack/xmldefaults.py

amd64_defaults and i386_defaults just lack an entry
for sdkarch.
Please fix this there.

the whole point of the defualts machinery is to not clutter
the code with if statements, and also define the defaults
in a single place.

> 
> 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
> 
> 
> _______________________________________________
> elbe-devel mailing list
> elbe-devel at linutronix.de
> https://lists.linutronix.de/mailman/listinfo/elbe-devel

-- 
Torben Hohn
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
Phone: +49 7556 25 999 18; Fax.: +49 7556 25 999 99

Hinweise zum Datenschutz finden Sie hier (Informations on data privacy 
can be found here): https://linutronix.de/kontakt/Datenschutz.php

Linutronix GmbH | Firmensitz (Registered Office): Uhldingen-Mühlhofen | 
Registergericht (Registration Court): Amtsgericht Freiburg i.Br., HRB700 
806 | Geschäftsführer (Managing Directors): Heinz Egger, Thomas Gleixner



More information about the elbe-devel mailing list