[elbe-devel] [PATCH 1/8] elbeproject: build_sysroot rework
Manuel Traut
manut at linutronix.de
Fri Jan 5 22:35:28 CET 2018
split out sysroot paths into extra function to
improve readability
Signed-off-by: Manuel Traut <manut at linutronix.de>
---
elbepack/elbeproject.py | 42 ++++++++++++++++++++++++------------------
1 file changed, 24 insertions(+), 18 deletions(-)
diff --git a/elbepack/elbeproject.py b/elbepack/elbeproject.py
index 09c23c16..992d2b3d 100644
--- a/elbepack/elbeproject.py
+++ b/elbepack/elbeproject.py
@@ -155,6 +155,29 @@ class ElbeProject (object):
--exclude=./proc/* --exclude=./var/cache/* \
-C %s ." % (self.builddir, self.chrootpath))
+ def __get_sysroot_paths(self):
+ triplet = self.xml.defs["triplet"]
+
+ paths = [
+ './usr/include',
+ './usr/include/' + triplet,
+ './etc/ld.so.conf*',
+ './opt/*/lib/*.so',
+ '/opt/*lib/*.so.*',
+ './opt/*/include/',
+ './opt/*/lib/' + triplet,
+ './opt/*/include/' + triplet,
+ './lib/*.so',
+ './lib/*.so.*',
+ './lib/' + triplet,
+ './usr/lib/*.so',
+ './usr/lib/*.so',
+ './usr/lib/*.so.*',
+ './usr/lib/' + triplet]
+
+ return paths
+
+
def build_sysroot(self):
# ignore packages from debootstrap
@@ -182,24 +205,7 @@ class ElbeProject (object):
self.log.do("chroot %s /usr/bin/symlinks -cr /usr/lib" %
self.chrootpath)
- triplet = self.xml.defs["triplet"]
-
- paths = [
- './usr/include',
- './usr/include/' + triplet,
- './etc/ld.so.conf*',
- './opt/*/lib/*.so',
- '/opt/*lib/*.so.*',
- './opt/*/include/',
- './opt/*/lib/' + triplet,
- './opt/*/include/' + triplet,
- './lib/*.so',
- './lib/*.so.*',
- './lib/' + triplet,
- './usr/lib/*.so',
- './usr/lib/*.so',
- './usr/lib/*.so.*',
- './usr/lib/' + triplet]
+ paths = self.__get_sysrootpaths()
self.log.do("rm %s" % sysrootfilelist, allow_fail=True)
--
2.15.1
More information about the elbe-devel
mailing list