[elbe-devel] [PATCH 04/11] elbeproject: build_sysroot rework
Manuel Traut
manut at linutronix.de
Mon Jan 29 13:21:03 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 fb6cbc2a..3bb4547f 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
@@ -186,24 +209,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