[elbe-devel] [PATCH 10/10] elbeproject: add some rmtree "finetuning" to the debootstrapped host sysroot

Torben Hohn torben.hohn at linutronix.de
Mon Apr 8 15:42:31 CEST 2019


Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>
---
 elbepack/elbeproject.py | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/elbepack/elbeproject.py b/elbepack/elbeproject.py
index 40977e8b..f88b8a60 100644
--- a/elbepack/elbeproject.py
+++ b/elbepack/elbeproject.py
@@ -336,6 +336,24 @@ class ElbeProject (object):
                 self.log.printo("commiting changes failed: %s" % str(e))
                 raise AptCacheCommitError(str(e))
 
+        # This is just a sysroot, some directories
+        # need to be removed.
+        #
+        # This can move into finetuning in the
+        # second implementation step.
+        self.host_sysrootenv.rfs.rmtree('/boot')
+        self.host_sysrootenv.rfs.rmtree('/dev')
+        self.host_sysrootenv.rfs.rmtree('/etc')
+        self.host_sysrootenv.rfs.rmtree('/home')
+        self.host_sysrootenv.rfs.rmtree('/media')
+        self.host_sysrootenv.rfs.rmtree('/mnt')
+        self.host_sysrootenv.rfs.rmtree('/proc')
+        self.host_sysrootenv.rfs.rmtree('/root')
+        self.host_sysrootenv.rfs.rmtree('/run')
+        self.host_sysrootenv.rfs.rmtree('/sys')
+        self.host_sysrootenv.rfs.rmtree('/tmp')
+        self.host_sysrootenv.rfs.rmtree('/var')
+
     def build_sdk(self):
         triplet = self.xml.defs["triplet"]
 
-- 
2.11.0




More information about the elbe-devel mailing list