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

Torben Hohn torben.hohn at linutronix.de
Thu Apr 16 13:27:11 CEST 2020


On Mon, Apr 06, 2020 at 11:22:56AM -0400, Olivier Dion wrote:
> On Thu, 02 Apr 2020, Torben Hohn <torben.hohn at linutronix.de> wrote:
> >
> > 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.
> 
> This work fine with i386 using sdkarch i686-linux-gnu, but it doesn't
> work for amd64 with x86-64-linux-gnu.  Even though g++-x86-64-linux-gnu
> is an alias for g++ on amd64 and thus can be installed, it's not
> accessible from the cache and make elbe crash ..  I guess I'll just
> change the buildtype.

errm... dont change the buildtype.

we currently only support amd64 sdks

the sdkarch thingy is used only at that specific point.
Lets just rename it to sdkcompiler ... so that we can make it "g++" for
amd64 and g++-blabla for the other archs.

alternatively, we could just fix the cache, to also check, for providing
packages...

>>> import apt
>>> c = apt.Cache()
>>> c['g++-x86-64-linux-gnu']
Traceback (most recent call last):
  File "<input>", line 1, in <module>
    c['g++-x86-64-linux-gnu']
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 303, in __getitem__
    raise KeyError('The cache has no package named %r' % key)
KeyError: "The cache has no package named 'g++-x86-64-linux-gnu'"
>>> c.get_providing_packages('g++-x86-64-linux-gnu')
[<Package: name:'g++' architecture='amd64' id:2122>, <Package: name:'g++-x86-64
-linux-gnu' architecture='arm64' id:184171>, <Package: name:'g++-x86-64-linux-g
nu' architecture='i386' id:92569>]
>>> 

note, that i have multiarch activated here, so i get more than one package.
But once this is constrained to the proper arch, there is only one possibility.

more than one package in the choice should be an error though.


> 
> -- 
> Olivier Dion
> Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
> 
> _______________________________________________
> 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