[elbe-devel] [PATCH 04/10] elbeproject: add <hostsdk-pkg-list> to define packages for host sysroot
Torben Hohn
torben.hohn at linutronix.de
Wed Apr 10 17:42:09 CEST 2019
On Wed, Apr 10, 2019 at 10:40:57AM +0200, Manuel Traut wrote:
> On 15:42 Mon 08 Apr , Torben Hohn wrote:
> > use the extract_pkg machinery to install specific packages into the
> > host sysroot. This allows, for example, to install a specific qt version
> > into the host sysroot.
> >
> > When no <hostsdk-pkg-list> is specified, it falls back to evaluating
> > self.xml.defs["sdkarch"] and installing 'g++-$sdkarch' and 'gdb-multiarch'
>
> Shouldn't we keep both g++ and gdb as 'defaults' in the list and extend the
> it with the values from hostsdk-pkg-list?
no. maybe one wants to install some cross clang, and doesnt want
gcc in the host sdk.
if i can specify the list of packages that shall be installed,
i would not expect that its only added to some default packages.
>
> > Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>
> > ---
> > elbepack/elbeproject.py | 38 ++++++++++++++++++++------------------
> > schema/dbsfed.xsd | 8 ++++++++
> > 2 files changed, 28 insertions(+), 18 deletions(-)
> >
> > diff --git a/elbepack/elbeproject.py b/elbepack/elbeproject.py
> > index 59fd9b04..73f917e9 100644
> > --- a/elbepack/elbeproject.py
> > +++ b/elbepack/elbeproject.py
> > @@ -301,10 +301,18 @@ class ElbeProject (object):
> > def build_sdk(self):
> > triplet = self.xml.defs["triplet"]
> >
> > - try:
> > - crosstoolchainpkg = "g++-%s" % self.xml.defs["sdkarch"]
> > - except KeyError:
> > - raise UnsupportedSDKException(triplet)
> > + host_pkglist = []
> > + if self.xml.tgt.has('hostsdk-pkg-list'):
> > + for p in self.xml.tgt.node('hostsdk-pkg-list'):
> > + if p.tag == 'pkg':
> > + host_pkglist.append(p.et.text.strip())
> > + else:
> > + try:
> > + host_pkglist.append("g++-%s" % self.xml.defs["sdkarch"])
> > + except KeyError:
> > + raise UnsupportedSDKException(triplet)
> > +
> > + host_pkglist.append('gdb-multiarch')
> >
> > # build target sysroot including libs and headers for the target
> > self.build_sysroot()
> > @@ -315,20 +323,14 @@ class ElbeProject (object):
> > # build host sysroot including cross compiler
> > hostsysrootpath = os.path.join(self.sdkpath, 'sysroots', 'host')
> > self.log.do('mkdir -p "%s"' % hostsysrootpath)
> > - extract_pkg(self.xml.prj,
> > - hostsysrootpath,
> > - self.xml.defs,
> > - crosstoolchainpkg,
> > - 'amd64',
> > - self.log,
> > - True)
> > - extract_pkg(self.xml.prj,
> > - hostsysrootpath,
> > - self.xml.defs,
> > - 'gdb-multiarch',
> > - 'amd64',
> > - self.log,
> > - True)
> > + for p in host_pkglist:
> > + extract_pkg(self.xml.prj,
> > + hostsysrootpath,
> > + self.xml.defs,
> > + p,
> > + 'amd64',
> > + self.log,
> > + True)
> >
> > n = gen_sdk_scripts(triplet,
> > self.name,
> > diff --git a/schema/dbsfed.xsd b/schema/dbsfed.xsd
> > index ccab23be..333c0a8b 100644
> > --- a/schema/dbsfed.xsd
> > +++ b/schema/dbsfed.xsd
> > @@ -873,6 +873,14 @@
> > </documentation>
> > </annotation>
> > </element>
> > + <element name="hostsdk-pkg-list" type="rfs:pkg-list" minOccurs="0" maxOccurs="1">
> > + <annotation>
> > + <documentation>
> > + install the given packages into the hostsdk. (ignores pin and versions,
> > + with the current implementation)
> > + </documentation>
> > + </annotation>
> > + </element>
> > </all>
> > <attribute ref="xml:base"/>
> > </complexType>
> > --
> > 2.11.0
> >
> >
> > _______________________________________________
> > 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.linutronix.de/pipermail/elbe-devel/attachments/20190410/59946868/attachment.sig>
More information about the elbe-devel
mailing list