Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
implement blacklisting of -dev packages
e.g. if libcurl3 is in the package list, elbe decides to install
libcurl-openssl-dev and libcurl-gnutls-dev into the sysroot. But
the packages are conflicting, so generating the sysroot crashes.
This patch extends the XML format for blacklisting -dev packages
for the sysroot.
Signed-off-by: Manuel Traut <manut@linutronix.de>
Loading branch information
@@ -774,6 +774,13 @@
</documentation >
</annotation >
</element >
<element name =" pkg-blacklist" type =" rfs:blacklist" minOccurs =" 0" maxOccurs =" 1" >
<annotation >
<documentation >
avoid installation of packages into sysroot or target
</documentation >
</annotation >
</element >
</sequence >
</complexType >
@@ -1747,6 +1754,30 @@
</sequence >
</complexType >
<complexType name =" blacklist" >
<annotation >
<documentation >
blacklists of debian packages
</documentation >
</annotation >
<sequence >
<element name =" sysroot" type =" rfs:pkg-list" minOccurs =" 0" maxOccurs =" unbounded" >
<annotation >
<documentation >
avoid installing the specified packages into the sysroot
</documentation >
</annotation >
</element >
<element name =" target" type =" rfs:pkg-list" minOccurs =" 0" maxOccurs =" unbounded" >
<annotation >
<documentation >
avoid installing the specified packages into the target
</documentation >
</annotation >
</element >
</sequence >
</complexType >
<complexType name =" fullpkg-list" >
<annotation >
<documentation >
@@ -130,11 +130,15 @@ def build_chroottarball (self):
def build_sysroot (self ):
debootstrap_pkgs = [p .et .text for p in self .xml .node ("debootstrappkgs" )]
# ignore packages from debootstrap
ignore_pkgs = [p .et .text for p in self .xml .node ("debootstrappkgs" )]
ignore_dev_pkgs = []
if self .xml .has ('target/pkg-blacklist/sysroot' ):
ignore_dev_pkgs = [p .et .text for p in self .xml .node ("target/pkg-blacklist/sysroot" )]
with self .buildenv :
try :
self .get_rpcaptcache ().mark_install_devpkgs (debootstrap_pkgs )
self .get_rpcaptcache ().mark_install_devpkgs (ignore_pkgs , ignore_dev_pkgs )
except SystemError as e :
self .log .printo ( "mark install devpkgs failed: %s" % str (e ) )
try :
@@ -92,7 +92,7 @@ def mark_install( self, pkgname, version, from_user=True, nodeps=False ):
auto_inst = not nodeps ,
from_user = from_user )
def mark_install_devpkgs ( self , ignore_pkgs ):
def mark_install_devpkgs ( self , ignore_pkgs , ignore_dev_pkgs ):
ignore_pkgs .remove ('libc6' ) # we don't want to ignore libc
# we don't want to ignore libstdc++
try :
@@ -111,7 +111,8 @@ def mark_install_devpkgs( self, ignore_pkgs ):
# '-dev' package
dev_list = [s for s in self .cache if (s .candidate .source_name in src_list and s .name .endswith ('-dev' ))]
for p in dev_list :
p .mark_install ()
if p .name not in ignore_dev_pkgs :
p .mark_install ()
# ensure that the symlinks package will be installed (it's needed for
# fixing links inside the sysroot
self .cache ['symlinks' ].mark_install ()
@@ -43,6 +43,12 @@
<pkg-list >
<pkg >linux-image-686-pae</pkg >
<pkg >grub-pc</pkg >
<pkg >libcurl3</pkg >
</pkg-list >
<pkg-blacklist >
<sysroot >
<pkg >libcurl4-openssl-dev</pkg >
</sysroot >
</pkg-blacklist >
</target >
</ns0 : RootFileSystem >
Toggle all file notes