pld-builder.new: PLD_Builder/build.py, PLD_Builder/buildlogs.py, PLD_Builde...
glen
glen at pld-linux.org
Tue Apr 7 16:23:32 CEST 2009
Author: glen Date: Tue Apr 7 14:23:32 2009 GMT
Module: pld-builder.new Tag: HEAD
---- Log message:
- trailing slashes where dir globals used not where defined
---- Files affected:
pld-builder.new/PLD_Builder:
build.py (1.12 -> 1.13) , buildlogs.py (1.19 -> 1.20) , file_sender.py (1.27 -> 1.28) , ftp.py (1.13 -> 1.14) , lock.py (1.4 -> 1.5) , maintainer.py (1.10 -> 1.11) , notifyq.py (1.1 -> 1.2) , path.py (1.14 -> 1.15) , report.py (1.34 -> 1.35) , request_handler.py (1.42 -> 1.43) , srpm_builder.py (1.53 -> 1.54)
---- Diffs:
================================================================
Index: pld-builder.new/PLD_Builder/build.py
diff -u pld-builder.new/PLD_Builder/build.py:1.12 pld-builder.new/PLD_Builder/build.py:1.13
--- pld-builder.new/PLD_Builder/build.py:1.12 Fri Feb 27 19:31:41 2009
+++ pld-builder.new/PLD_Builder/build.py Tue Apr 7 16:23:26 2009
@@ -36,7 +36,7 @@
def build_all(r, build_fnc):
status.email = r.requester_email
notify.begin(r)
- tmp = path.build_dir + util.uuid() + "/"
+ tmp = path.build_dir + '/' + util.uuid() + "/"
r.tmp_dir = tmp
os.mkdir(tmp)
atexit.register(util.clean_tmp, tmp)
================================================================
Index: pld-builder.new/PLD_Builder/buildlogs.py
diff -u pld-builder.new/PLD_Builder/buildlogs.py:1.19 pld-builder.new/PLD_Builder/buildlogs.py:1.20
--- pld-builder.new/PLD_Builder/buildlogs.py:1.19 Tue Jan 20 09:27:13 2009
+++ pld-builder.new/PLD_Builder/buildlogs.py Tue Apr 7 16:23:26 2009
@@ -23,13 +23,13 @@
return
name = re.sub(r"\.spec\.log", "", os.path.basename(logfile)) + "," + id + ".bz2"
ret = os.system("bzip2 --best --force < %s > %s" \
- % (logfile, path.buildlogs_queue_dir + id))
+ % (logfile, path.buildlogs_queue_dir + '/' + id))
if ret:
log.error("bzip2 compression of %s failed; does bzip2 binary exist?" % (logfile))
if failed: s = "FAIL"
else: s = "OK"
- f = open(path.buildlogs_queue_dir + id + ".info", "w")
+ f = open(path.buildlogs_queue_dir + '/' + id + ".info", "w")
f.write("Status: %s\nEND\n" % s)
f.close()
@@ -46,7 +46,7 @@
""" % (config.buildlogs_url, l['name'], config.builder, time.time(), self.requester_email)
for l in self.queue:
- f = open(path.buildlogs_queue_dir + l['id'] + ".desc", "w")
+ f = open(path.buildlogs_queue_dir + '/' + l['id'] + ".desc", "w")
f.write(desc(l))
f.close()
================================================================
Index: pld-builder.new/PLD_Builder/file_sender.py
diff -u pld-builder.new/PLD_Builder/file_sender.py:1.27 pld-builder.new/PLD_Builder/file_sender.py:1.28
--- pld-builder.new/PLD_Builder/file_sender.py:1.27 Fri Mar 20 12:39:21 2009
+++ pld-builder.new/PLD_Builder/file_sender.py Tue Apr 7 16:23:26 2009
@@ -120,20 +120,20 @@
def maybe_flush_queue(dir):
retry_delay = 0
try:
- f = open(dir + "retry-at")
+ f = open(dir + "/retry-at")
last_retry = int(string.strip(f.readline()))
retry_delay = int(string.strip(f.readline()))
f.close()
if last_retry + retry_delay > time.time():
return
- os.unlink(dir + "retry-at")
+ os.unlink(dir + "/retry-at")
except:
pass
status.push("flushing %s" % dir)
if flush_queue(dir):
- f = open(dir + "retry-at", "w")
+ f = open(dir + "/retry-at", "w")
if retry_delay in retries_times:
idx = retries_times.index(retry_delay)
if idx < len(retries_times) - 1: idx += 1
================================================================
Index: pld-builder.new/PLD_Builder/ftp.py
diff -u pld-builder.new/PLD_Builder/ftp.py:1.13 pld-builder.new/PLD_Builder/ftp.py:1.14
--- pld-builder.new/PLD_Builder/ftp.py:1.13 Sun Feb 27 12:37:52 2005
+++ pld-builder.new/PLD_Builder/ftp.py Tue Apr 7 16:23:26 2009
@@ -32,9 +32,9 @@
return
name = os.path.basename(file)
id = util.uuid()
- shutil.copy(file, path.ftp_queue_dir + id)
+ shutil.copy(file, path.ftp_queue_dir + '/' + id)
self.queue.append({'name': name, 'id': id, 'type': type})
- st = os.stat(path.ftp_queue_dir + id)
+ st = os.stat(path.ftp_queue_dir + '/' + id)
self.status += "%10d %s\n" % (st.st_size, name)
def flush(self):
@@ -48,13 +48,13 @@
""" % (self.url, l['name'], config.builder, time.time(), l['type'], self.requester_email)
for l in self.queue:
- f = open(path.ftp_queue_dir + l['id'] + ".desc", "w")
+ f = open(path.ftp_queue_dir + '/' + l['id'] + ".desc", "w")
f.write(desc(l))
f.close()
def kill(self):
for l in self.queue:
- os.unlink(path.ftp_queue_dir + l)
+ os.unlink(path.ftp_queue_dir + '/' + l)
queue = FTP_Queue()
================================================================
Index: pld-builder.new/PLD_Builder/lock.py
diff -u pld-builder.new/PLD_Builder/lock.py:1.4 pld-builder.new/PLD_Builder/lock.py:1.5
--- pld-builder.new/PLD_Builder/lock.py:1.4 Thu Dec 9 19:09:04 2004
+++ pld-builder.new/PLD_Builder/lock.py Tue Apr 7 16:23:26 2009
@@ -7,7 +7,7 @@
locks_list = []
def lock(n, non_block = 0):
- f = open(path.lock_dir + n, "a")
+ f = open(path.lock_dir + '/' + n, "a")
# blah, otherwise it gets garbage collected and doesn't work
locks_list.append(f)
if non_block:
================================================================
Index: pld-builder.new/PLD_Builder/maintainer.py
diff -u pld-builder.new/PLD_Builder/maintainer.py:1.10 pld-builder.new/PLD_Builder/maintainer.py:1.11
--- pld-builder.new/PLD_Builder/maintainer.py:1.10 Sun Mar 1 10:10:03 2009
+++ pld-builder.new/PLD_Builder/maintainer.py Tue Apr 7 16:23:26 2009
@@ -21,7 +21,7 @@
os.unlink(path+'/'+i)
def send_rpmqa():
- tmp = path.build_dir + util.uuid() + '/'
+ tmp = path.build_dir + '/' + util.uuid() + '/'
os.mkdir(tmp)
log = tmp + config.rpmqa_filename
open(log, 'a').write("Query done at: %s\n" % datetime.datetime.now().isoformat(' '))
@@ -35,7 +35,7 @@
def handle_src():
send_rpmqa()
- clean_dir(path.www_dir+'srpms', 2592000) # a month
+ clean_dir(path.www_dir+'/srpms', 2592000) # a month
def handle_bin():
send_rpmqa()
@@ -61,7 +61,7 @@
if __name__ == '__main__':
init_conf()
bb=config.binary_builders[:]
- clean_dir(path.spool_dir+'builds', 2592000) # a month
+ clean_dir(path.spool_dir+'/builds', 2592000) # a month
if config.src_builder:
try:
init_conf(config.src_builder)
================================================================
Index: pld-builder.new/PLD_Builder/notifyq.py
diff -u pld-builder.new/PLD_Builder/notifyq.py:1.1 pld-builder.new/PLD_Builder/notifyq.py:1.2
--- pld-builder.new/PLD_Builder/notifyq.py:1.1 Wed Mar 7 20:18:32 2007
+++ pld-builder.new/PLD_Builder/notifyq.py Tue Apr 7 16:23:26 2009
@@ -20,7 +20,7 @@
def add(self, file):
id = util.uuid()
- f = open(path.notify_queue_dir + id, 'w')
+ f = open(path.notify_queue_dir + '/' + id, 'w')
f.write(file.read())
f.close()
self.queue.append({'id': id})
@@ -36,13 +36,13 @@
""" % (self.notify_url, l['id'], config.builder, time.time(), self.requester_email)
for l in self.queue:
- f = open(path.notify_queue_dir + l['id'] + ".desc", "w")
+ f = open(path.notify_queue_dir + '/' + l['id'] + ".desc", "w")
f.write(desc(l))
f.close()
def kill(self):
for l in self.queue:
- os.unlink(path.notify_queue_dir + l)
+ os.unlink(path.notify_queue_dir + '/' + l)
queue = Notify_Queue()
================================================================
Index: pld-builder.new/PLD_Builder/path.py
diff -u pld-builder.new/PLD_Builder/path.py:1.14 pld-builder.new/PLD_Builder/path.py:1.15
--- pld-builder.new/PLD_Builder/path.py:1.14 Wed Mar 7 20:18:32 2007
+++ pld-builder.new/PLD_Builder/path.py Tue Apr 7 16:23:26 2009
@@ -2,31 +2,31 @@
import os.path
-root_dir = os.path.expanduser('~/pld-builder.new/')
-conf_dir = root_dir + "config/"
-spool_dir = root_dir + "spool/"
-lock_dir = root_dir + "lock/"
-www_dir = root_dir + "www/"
+root_dir = os.path.expanduser('~/pld-builder.new')
+conf_dir = root_dir + "/config"
+spool_dir = root_dir + "/spool"
+lock_dir = root_dir + "/lock"
+www_dir = root_dir + "/www"
-acl_conf = conf_dir + "acl.conf"
-builder_conf = conf_dir + "builder.conf"
-rsync_password_file = conf_dir + "rsync-passwords"
+acl_conf = conf_dir + "/acl.conf"
+builder_conf = conf_dir + "/builder.conf"
+rsync_password_file = conf_dir + "/rsync-passwords"
# spool/
-queue_file = spool_dir + "queue"
-req_queue_file = spool_dir + "req_queue"
-processed_ids_file = spool_dir + "processed_ids"
-notify_queue_dir = spool_dir + "notify/"
-buildlogs_queue_dir = spool_dir + "buildlogs/"
-ftp_queue_dir = spool_dir + "ftp/"
-build_dir = spool_dir + "builds/"
-last_req_no_file = spool_dir + "last_req_no"
-got_lock_file = spool_dir + "got_lock"
-log_file = spool_dir + "log"
+queue_file = spool_dir + "/queue"
+req_queue_file = spool_dir + "/req_queue"
+processed_ids_file = spool_dir + "/processed_ids"
+notify_queue_dir = spool_dir + "/notify"
+buildlogs_queue_dir = spool_dir + "/buildlogs"
+ftp_queue_dir = spool_dir + "/ftp"
+build_dir = spool_dir + "/builds"
+last_req_no_file = spool_dir + "/last_req_no"
+got_lock_file = spool_dir + "/got_lock"
+log_file = spool_dir + "/log"
# www/
-srpms_dir = www_dir + "srpms/"
-req_queue_signed_file = www_dir + "queue.gz"
-max_req_no_file = www_dir + "max_req_no"
-queue_stats_file = www_dir + "queue.txt"
-queue_html_stats_file = www_dir + "queue.html"
+srpms_dir = www_dir + "/srpms"
+req_queue_signed_file = www_dir + "/queue.gz"
+max_req_no_file = www_dir + "/max_req_no"
+queue_stats_file = www_dir + "/queue.txt"
+queue_html_stats_file = www_dir + "/queue.html"
================================================================
Index: pld-builder.new/PLD_Builder/report.py
diff -u pld-builder.new/PLD_Builder/report.py:1.34 pld-builder.new/PLD_Builder/report.py:1.35
--- pld-builder.new/PLD_Builder/report.py:1.34 Thu Jan 24 23:31:36 2008
+++ pld-builder.new/PLD_Builder/report.py Tue Apr 7 16:23:26 2009
@@ -117,7 +117,7 @@
m.set_header("X-builder", "PLD")
# get header of xml message from file
- f = open(path.root_dir + 'PLD_Builder/cia-head.xml')
+ f = open(path.root_dir + '/PLD_Builder/cia-head.xml')
m.write(f.read())
f.close()
@@ -132,7 +132,7 @@
m.write('</package>\n')
# get footer of xml message from file
- f = open(path.root_dir + 'PLD_Builder/cia-foot.xml')
+ f = open(path.root_dir + '/PLD_Builder/cia-foot.xml')
m.write(f.read())
f.close()
================================================================
Index: pld-builder.new/PLD_Builder/request_handler.py
diff -u pld-builder.new/PLD_Builder/request_handler.py:1.42 pld-builder.new/PLD_Builder/request_handler.py:1.43
--- pld-builder.new/PLD_Builder/request_handler.py:1.42 Sun Feb 8 16:20:09 2009
+++ pld-builder.new/PLD_Builder/request_handler.py Tue Apr 7 16:23:26 2009
@@ -123,7 +123,7 @@
r.apply_to(q)
for r in not_fin:
if r.is_done():
- util.clean_tmp(path.srpms_dir + r.id)
+ util.clean_tmp(path.srpms_dir + '/' + r.id)
now = time.time()
def leave_it(r):
# for ,,done'' set timeout to 4d
@@ -131,7 +131,7 @@
return False
# and for not ,,done'' set it to 20d
if r.time + 20 * 24 * 60 * 60 < now:
- util.clean_tmp(path.srpms_dir + r.id)
+ util.clean_tmp(path.srpms_dir + '/' + r.id)
return False
return True
q.requests = filter(leave_it, q.requests)
================================================================
Index: pld-builder.new/PLD_Builder/srpm_builder.py
diff -u pld-builder.new/PLD_Builder/srpm_builder.py:1.53 pld-builder.new/PLD_Builder/srpm_builder.py:1.54
--- pld-builder.new/PLD_Builder/srpm_builder.py:1.53 Fri Feb 27 23:04:43 2009
+++ pld-builder.new/PLD_Builder/srpm_builder.py Tue Apr 7 16:23:27 2009
@@ -69,7 +69,7 @@
os.chmod(path.max_req_no_file, 0644)
def transfer_file(r, b):
- local = path.srpms_dir + r.id + "/" + b.src_rpm
+ local = path.srpms_dir + '/' + r.id + "/" + b.src_rpm
f = b.src_rpm_file
# export files from chroot
chroot.cp(f, outfile = local, rm = True)
@@ -77,7 +77,7 @@
ftp.add(local)
if config.gen_upinfo and 'test-build' not in r.flags:
- fname = path.srpms_dir + r.id + "/" + b.src_rpm + ".uploadinfo"
+ fname = path.srpms_dir + '/' + r.id + "/" + b.src_rpm + ".uploadinfo"
f = open(fname, "w")
f.write("info:build:%s:requester:%s\ninfo:build:%s:requester_email:%s\nfile:SRPMS:%s\nEND\n" % (b.gb_id, b.requester, b.gb_id, b.requester_email, b.src_rpm))
f.close()
@@ -125,8 +125,8 @@
return res
def handle_request(r):
- os.mkdir(path.srpms_dir + r.id)
- os.chmod(path.srpms_dir + r.id, 0755)
+ os.mkdir(path.srpms_dir + '/' + r.id)
+ os.chmod(path.srpms_dir + '/' + r.id, 0755)
ftp.init(r)
buildlogs.init(r)
build.build_all(r, build_srpm)
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/pld-builder.new/PLD_Builder/build.py?r1=1.12&r2=1.13&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/pld-builder.new/PLD_Builder/buildlogs.py?r1=1.19&r2=1.20&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/pld-builder.new/PLD_Builder/file_sender.py?r1=1.27&r2=1.28&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/pld-builder.new/PLD_Builder/ftp.py?r1=1.13&r2=1.14&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/pld-builder.new/PLD_Builder/lock.py?r1=1.4&r2=1.5&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/pld-builder.new/PLD_Builder/maintainer.py?r1=1.10&r2=1.11&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/pld-builder.new/PLD_Builder/notifyq.py?r1=1.1&r2=1.2&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/pld-builder.new/PLD_Builder/path.py?r1=1.14&r2=1.15&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/pld-builder.new/PLD_Builder/report.py?r1=1.34&r2=1.35&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/pld-builder.new/PLD_Builder/request_handler.py?r1=1.42&r2=1.43&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/pld-builder.new/PLD_Builder/srpm_builder.py?r1=1.53&r2=1.54&f=u
More information about the pld-cvs-commit
mailing list