[projects/pld-builder.new] Revert 508a95ef0dbe1000f275858e87511ce08729ad49, setting tmpdir based on $HOME

baggins baggins at pld-linux.org
Fri Oct 19 07:47:01 CEST 2012


commit 600aeaf779e8e507c821b05ef8da6fe109d9ac2e
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Fri Oct 19 07:44:34 2012 +0200

    Revert 508a95ef0dbe1000f275858e87511ce08729ad49, setting tmpdir based on $HOME
    
    Setting tmpdir based on $HOME moake no sense because it gets ~ of user
    on host which may be different than ~builder in chroot, thus setting
    $TMPDIR practically nowhere.

 PLD_Builder/install.py     | 4 ++--
 PLD_Builder/rpm_builder.py | 5 +----
 2 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/PLD_Builder/install.py b/PLD_Builder/install.py
index b0b03e4..b2439c2 100644
--- a/PLD_Builder/install.py
+++ b/PLD_Builder/install.py
@@ -101,7 +101,7 @@ def uninstall(conflicting, b):
 def uninstall_self_conflict(b):
     b.log_line("checking BuildConflict-ing packages")
     packagename = b.spec[:-5]
-    tmpdir = os.environ.get('HOME') + "/rpm/BUILD/%s.%s/tmp" % packagename, b.b_id[0:6]
+    tmpdir = "/tmp/B.%s.%s/tmp" % (packagename, b.b_id[0:6])
     chroot.run("install -m 700 -d %s" % tmpdir)
     f = chroot.popen("set -e; TMPDIR=%(tmpdir)s rpmbuild -bp --nobuild --short-circuit --define 'prep exit 0' %(rpmdefs)s rpm/packages/%(package)s/%(spec)s 2>&1" % {
         'tmpdir': tmpdir,
@@ -132,7 +132,7 @@ def install_br(r, b):
         ignore_br = re.compile(r'^\s*(rpmlib|cpuinfo|getconf|uname|soname|user|group|mounted|diskspace|digest|gnupg|macro|envvar|running|sanitycheck|vcheck|signature|verify|exists|executable|readable|writable)\(.*')
 
         packagename = b.spec[:-5]
-        tmpdir = os.environ.get('HOME') + "/rpm/BUILD/%s.%s/tmp" % packagename, b.b_id[0:6]
+        tmpdir = "/tmp/B.%s.%s/tmp" % (packagename, b.b_id[0:6])
         chroot.run("install -m 700 -d %s" % tmpdir)
         cmd = "set -e; TMPDIR=%(tmpdir)s rpmbuild --nobuild %(rpmdefs)s rpm/packages/%(package)s/%(spec)s 2>&1" % {
             'tmpdir': tmpdir,
diff --git a/PLD_Builder/rpm_builder.py b/PLD_Builder/rpm_builder.py
index 17b6a6b..dd42de6 100644
--- a/PLD_Builder/rpm_builder.py
+++ b/PLD_Builder/rpm_builder.py
@@ -191,10 +191,7 @@ def build_rpm(r, b):
     }, logfile = b.logfile)
     b.files = []
 
-    # it's better to have TMPDIR and BUILD dir on same partition:
-    # + /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
-    tmpdir = os.environ.get('HOME') + "/rpm/BUILD/%s.%s/tmp" % packagename, b.b_id[0:6]
+    tmpdir = "/tmp/B.%s.%s/tmp" % (packagename, b.b_id[0:6])
     if res:
         b.log_line("error: installing src rpm failed")
         res = "FAIL_SRPM_INSTALL"
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list