[elbe-devel] [PATCH] elbeproject: raise UnsupportedSDKException

Torben Hohn torben.hohn at linutronix.de
Wed Jul 15 17:56:44 CEST 2020


On Wed, Jul 15, 2020 at 05:40:45PM +0206, John Ogness wrote:
> If host_pkglist.append() fails, a KeyError exception is raised
> that the package "g++-None" is not found. The
> UnsupportedSDKException is never raised.
> 
> Explicitly raise UnsupportedSDKException if sdkarch is not
> defined for the architecture.
> 
> Note that if sdkarch is defined and the g++-sdkarch package
> does not exist, the KeyError exception will still be raised. This
> is correct since it would be a bug in ELBE that specifies the
> wrong sdkarch value.
> 
> Signed-off-by: John Ogness <john.ogness at linutronix.de>

Reviewed-by: Torben Hohn <torben.hohn at linutronix.de>

> ---
>  elbepack/elbeproject.py | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/elbepack/elbeproject.py b/elbepack/elbeproject.py
> index 3bf0f1789..1c72327ac 100644
> --- a/elbepack/elbeproject.py
> +++ b/elbepack/elbeproject.py
> @@ -377,9 +377,9 @@ class ElbeProject (object):
>                  if p.tag == 'pkg':
>                      host_pkglist.append(p.et.text.strip())
>          else:
> -            try:
> +            if self.xml.defs["sdkarch"]:
>                  host_pkglist.append("g++-%s" % self.xml.defs["sdkarch"])
> -            except KeyError:
> +            else:
>                  raise UnsupportedSDKException(triplet)
>  
>              host_pkglist.append('gdb-multiarch')
> -- 
> 2.20.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