[projects/pld-builder.new] - tmpdir cleanup after revert
baggins
baggins at pld-linux.org
Fri Oct 19 07:58:42 CEST 2012
commit d0339a9cd96d9f6e037b8b185c52d753cf32c26e
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Fri Oct 19 07:58:24 2012 +0200
- tmpdir cleanup after revert
PLD_Builder/install.py | 6 +-----
PLD_Builder/rpm_builder.py | 2 +-
2 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/PLD_Builder/install.py b/PLD_Builder/install.py
index b2439c2..a90f21a 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 = "/tmp/B.%s.%s/tmp" % (packagename, b.b_id[0:6])
+ tmpdir = "/tmp/B.%s.%s" % 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,
@@ -157,7 +157,6 @@ def install_br(r, b):
if len(needed) == 0:
b.log_line("no BR needed")
- chroot.run("rm -rf %s" % tmpdir)
return True
nbr = ""
@@ -183,7 +182,6 @@ def install_br(r, b):
b.log_line("no conflicts found")
else:
if not uninstall(conflicting, b):
- chroot.run("rm -rf %s" % tmpdir)
return False
# recheck BuildRequires since above uninstallation could remove some required deps
@@ -191,7 +189,6 @@ def install_br(r, b):
if len(needed) == 0:
b.log_line("no BR needed")
- chroot.run("rm -rf %s" % tmpdir)
return True
nbr = ""
@@ -203,7 +200,6 @@ def install_br(r, b):
res = chroot.run("poldek --noask --caplookup -Q -v --upgrade %s" % br,
user = "root",
logfile = b.logfile)
- chroot.run("rm -rf %s" % tmpdir)
if res != 0:
b.log_line("error: BR installation failed")
return False
diff --git a/PLD_Builder/rpm_builder.py b/PLD_Builder/rpm_builder.py
index dd42de6..2cf525f 100644
--- a/PLD_Builder/rpm_builder.py
+++ b/PLD_Builder/rpm_builder.py
@@ -191,7 +191,7 @@ def build_rpm(r, b):
}, logfile = b.logfile)
b.files = []
- tmpdir = "/tmp/B.%s.%s/tmp" % (packagename, b.b_id[0:6])
+ tmpdir = "/tmp/B.%s.%s" % (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/d0339a9cd96d9f6e037b8b185c52d753cf32c26e
More information about the pld-cvs-commit
mailing list