pld-builder.new: PLD_Builder/install.py, PLD_Builder/rpm_builder.py it's be...

glen glen at pld-linux.org
Sat Mar 24 01:52:55 CET 2012


Author: glen                         Date: Sat Mar 24 00:52:55 2012 GMT
Module: pld-builder.new               Tag: HEAD
---- Log message:
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
otherwise it has to move temp files between partitions

---- Files affected:
pld-builder.new/PLD_Builder:
   install.py (1.27 -> 1.28) , rpm_builder.py (1.129 -> 1.130) 

---- Diffs:

================================================================
Index: pld-builder.new/PLD_Builder/install.py
diff -u pld-builder.new/PLD_Builder/install.py:1.27 pld-builder.new/PLD_Builder/install.py:1.28
--- pld-builder.new/PLD_Builder/install.py:1.27	Wed Mar 21 02:25:52 2012
+++ pld-builder.new/PLD_Builder/install.py	Sat Mar 24 01:52:50 2012
@@ -1,6 +1,6 @@
 # vi: encoding=utf-8 ts=8 sts=4 sw=4 et
 
-import re
+import re, os
 import string
 import StringIO
 
@@ -100,8 +100,8 @@
 
 def uninstall_self_conflict(b):
     b.log_line("checking BuildConflict-ing packages")
-    tmpdir = "/tmp/BR." + b.b_id[0:6]
     packagename = b.spec[:-5]
+    tmpdir = os.environ.get('HOME') + "/rpm/BUILD/%s/tmp" % packagename
     f = chroot.popen("set -ex; TMPDIR=%(tmpdir)s rpmbuild -bp --nobuild --short-circuit --define 'prep exit 0' %(rpmdefs)s rpm/packages/%(package)s/%(spec)s 2>&1" % {
         'tmpdir': tmpdir,
         'rpmdefs' : b.rpmbuild_opts(),
@@ -128,8 +128,8 @@
         # ignore internal rpm dependencies, see lib/rpmns.c for list
         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)\(.*')
 
-        tmpdir = "/tmp/BR." + b.b_id[0:6]
         packagename = b.spec[:-5]
+        tmpdir = os.environ.get('HOME') + "/rpm/BUILD/%s/tmp" % packagename
         chroot.run("install -m 700 -d %s" % tmpdir)
         cmd = "set -ex; TMPDIR=%(tmpdir)s rpmbuild --nobuild %(rpmdefs)s rpm/packages/%(package)s/%(spec)s 2>&1" % {
             'tmpdir': tmpdir,
@@ -147,7 +147,6 @@
             if m and not ignore_br.match(l):
                 needed[m.group('name')] = 1
         f.close()
-        chroot.run("rm -rf %s" % tmpdir)
         return needed
 
     needed = get_missing_br(r, b);

================================================================
Index: pld-builder.new/PLD_Builder/rpm_builder.py
diff -u pld-builder.new/PLD_Builder/rpm_builder.py:1.129 pld-builder.new/PLD_Builder/rpm_builder.py:1.130
--- pld-builder.new/PLD_Builder/rpm_builder.py:1.129	Wed Mar 21 02:25:52 2012
+++ pld-builder.new/PLD_Builder/rpm_builder.py	Sat Mar 24 01:52:50 2012
@@ -175,7 +175,11 @@
         'src_rpm' : b.src_rpm
     }, logfile = b.logfile)
     b.files = []
-    tmpdir = "/tmp/B." + b.b_id[0:6]
+
+    # 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/tmp" % packagename
     if res:
         b.log_line("error: installing src rpm failed")
         res = "FAIL_SRPM_INSTALL"
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/pld-builder.new/PLD_Builder/install.py?r1=1.27&r2=1.28
    http://cvs.pld-linux.org/pld-builder.new/PLD_Builder/rpm_builder.py?r1=1.129&r2=1.130



More information about the pld-cvs-commit mailing list