[projects/pld-builder.new: 6/7] Fix position of tmpdir to be in chroot directory

draenog draenog at pld-linux.org
Thu Dec 6 19:18:56 CET 2012


commit 9bd7106a1abe3e0ff12864e573c17e4fde016858
Author: Kacper Kornet <draenog at pld-linux.org>
Date:   Thu Dec 6 14:33:23 2012 +0000

    Fix position of tmpdir to be in chroot directory

 PLD_Builder/request.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/PLD_Builder/request.py b/PLD_Builder/request.py
index a5aa1a3..909d2c8 100644
--- a/PLD_Builder/request.py
+++ b/PLD_Builder/request.py
@@ -230,11 +230,12 @@ class Batch:
         # + /usr/bin/bzip2 -dc /home/services/builder/rpm/packages/kernel/patch-2.6.27.61.bz2
         # patch: **** Can't rename file /tmp/B.a1b1d3/poKWwRlp to drivers/scsi/hosts.c : No such file or directory
         path = os.path.join(self._topdir, 'BUILD', 'tmp')
-        if not os.path.isdir(path):
+        chroot_path = config.chroot + path
+        if not os.path.isdir(chroot_path):
             try:
-                os.makedirs(path)
+                os.makedirs(chroot_path)
             except OSError as e:
-                log.error("Cannot create directory %s: %s" % (path, e.strerror))
+                log.error("Cannot create directory %s: %s" % (chroot_path, e.strerror))
         return path
 
     def is_done(self):
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/pld-builder.new.git/commitdiff/c5bc3f6ddecdfa78f83c7f7fc4b8b02733831340



More information about the pld-cvs-commit mailing list