[elbe-devel] [PATCH v2 08/24] rfs: debootstrap always into clean target dir

Manuel Traut manut at linutronix.de
Thu Feb 8 14:16:54 CET 2018


deboostraping causes errors if running on an existing filesystem.
Ensure on call to run on a plain but preinitialized directory.

Signed-off-by: Manuel Traut <manut at linutronix.de>
---
 elbepack/rfs.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/elbepack/rfs.py b/elbepack/rfs.py
index 111408b1..6c2ffa4a 100644
--- a/elbepack/rfs.py
+++ b/elbepack/rfs.py
@@ -43,6 +43,9 @@ class BuildEnv ():
         if clean:
             self.rfs.rmtree("")
 
+        self.gen_base_files()
+
+    def gen_base_files(self):
         # TODO think about reinitialization if elbe_version differs
         if not self.rfs.isfile("etc/elbe_version"):
             # avoid starting daemons inside the buildenv
@@ -99,6 +102,11 @@ class BuildEnv ():
         cleanup = False
         suite = self.xml.prj.text("suite")
 
+        # deboostraping causes errors if running on an existing filesystem
+        # ensure to run on an empty directory
+        self.rfs.rmtree("/")
+        self.gen_base_files()
+
         primary_mirror = self.xml.get_primary_mirror(
             self.rfs.fname('/cdrom/targetrepo'))
 
-- 
2.15.1




More information about the elbe-devel mailing list