]> git.e2factory.org Git - e2factory.git/commitdiff
e2build: clarify creation of directories
authorTobias Ulmer <tu@emlix.com>
Thu, 21 Dec 2017 15:21:53 +0000 (16:21 +0100)
committerTobias Ulmer <tu@emlix.com>
Mon, 10 Dec 2018 17:00:11 +0000 (18:00 +0100)
Signed-off-by: Tobias Ulmer <tu@emlix.com>
local/e2build.lua

index 1cbdabe2017b2fb6c9e154088d59895d5cca69e5..e9b47ace41af03b012dac6307d95ad1d0544e925 100644 (file)
@@ -362,7 +362,7 @@ function e2build.build_process_class:_chroot_lock(res, rbs)
     local e = err.new("error locking chroot")
 
     bc = res:build_config()
-    rc, re = e2lib.mkdir_recursive(bc.c)
+    rc, re = e2lib.mkdir_recursive(bc.base)
     if not rc then
         return false, e:cat(re)
     end
@@ -420,10 +420,12 @@ end
 function e2build.build_process_class:_setup_chroot(res, rbs)
     local rc, re, bc
     local e = err.new("error setting up chroot")
+
     -- create the chroot path and create the chroot marker file without root
     -- permissions. That makes sure we have write permissions here.
     bc = res:build_config()
-    rc, re = e2lib.mkdir_recursive(bc.c)
+
+    rc, re = e2lib.mkdir_recursive(bc.base)
     if not rc then
         return false, e:cat(re)
     end
@@ -433,9 +435,12 @@ function e2build.build_process_class:_setup_chroot(res, rbs)
         return false, e:cat(re)
     end
 
-    local cm = rc
+    rc, re = eio.fclose(rc)
+    if not rc then
+        return false, e:cat(re)
+    end
 
-    rc, re = eio.fclose(cm)
+    rc, re = e2lib.mkdir(bc.c)
     if not rc then
         return false, e:cat(re)
     end