pld-builder.new: PLD_Builder/build.py, PLD_Builder/request.py, PLD_Builder/...
arekm
arekm at pld-linux.org
Fri Feb 27 18:45:12 CET 2009
Author: arekm Date: Fri Feb 27 17:45:12 2009 GMT
Module: pld-builder.new Tag: HEAD
---- Log message:
- more statuses supported
---- Files affected:
pld-builder.new/PLD_Builder:
build.py (1.9 -> 1.10) , request.py (1.52 -> 1.53) , rpm_builder.py (1.65 -> 1.66)
---- Diffs:
================================================================
Index: pld-builder.new/PLD_Builder/build.py
diff -u pld-builder.new/PLD_Builder/build.py:1.9 pld-builder.new/PLD_Builder/build.py:1.10
--- pld-builder.new/PLD_Builder/build.py:1.9 Tue Jan 20 09:20:30 2009
+++ pld-builder.new/PLD_Builder/build.py Fri Feb 27 18:45:07 2009
@@ -83,12 +83,12 @@
batch.requester_email=r.requester_email
batch.build_failed = build_fnc(r, batch)
if batch.build_failed:
- log.notice("building %s FAILED" % batch.spec)
- notify.add_batch(batch, "FAIL")
+ log.notice("building %s FAILED (%s)" % batch.spec, batch.build_failed)
+ notify.add_batch(batch, batch.build_failed)
else:
r.some_ok = 1
- log.notice("building %s OK" % batch.spec)
- notify.add_batch(batch, "OK")
+ log.notice("building %s OK (%s)" % batch.spec, batch.build_failed)
+ notify.add_batch(batch, batch.build_failed)
batch.build_time = stopwatch.stop()
report.add_pld_builder_info(batch)
buildlogs.add(batch.logfile, failed = batch.build_failed, id=r.id)
================================================================
Index: pld-builder.new/PLD_Builder/request.py
diff -u pld-builder.new/PLD_Builder/request.py:1.52 pld-builder.new/PLD_Builder/request.py:1.53
--- pld-builder.new/PLD_Builder/request.py:1.52 Mon Feb 16 12:57:50 2009
+++ pld-builder.new/PLD_Builder/request.py Fri Feb 27 18:45:07 2009
@@ -168,7 +168,8 @@
ok = 1
for b in self.builders:
s = self.builders_status[b]
- if not (s == "OK" or s == "FAIL" or s == "SKIP"):
+ if not s in ["OK", "FAIL", "FAIL_SRPM_INSTALL", "FAIL_DEPS_UNINSTALL", "FAIL_DEPS_INSTALL",
+ "FAIL_NOFILES", "SKIP", "UNSUPP"]:
ok = 0
return ok
@@ -200,15 +201,18 @@
s = self.builders_status[b]
if s == "OK":
c = "green"
- elif s == "FAIL":
+ elif s in ["FAIL", "FAIL_SRPM_INSTALL", "FAIL_DEPS_UNINSTALL", "FAIL_DEPS_INSTALL", "FAIL_NOFILES"]:
c = "red"
elif s == "SKIP":
c = "blue"
+ elif s == "UNSUPP":
+ c = "yellow"
else:
c = "black"
link_pre = ""
link_post = ""
- if (s == "OK" or s == "FAIL") and len(self.spec) > 5:
+ if (s in ["OK", "FAIL", "FAIL_SRPM_INSTALL", "FAIL_DEPS_UNINSTALL", "FAIL_DEPS_INSTALL",
+ "FAIL_NOFILES", "SKIP", "UNSUPP"] and len(self.spec) > 5:
if self.is_command():
bl_name = "command"
else:
@@ -306,7 +310,7 @@
if c.nodeName == "batch":
id = attr(c, "id")
status = attr(c, "status")
- if status != "OK" and status != "FAIL" and status != "SKIP":
+ if status not in ["OK", "FAIL", "FAIL_SRPM_INSTALL", "FAIL_DEPS_UNINSTALL", "FAIL_DEPS_INSTALL", "FAIL_NOFILES", "SKIP", "UNSUPP"]:
log.panic("xml notification: bad status: %s" % self.status)
self.batches[id] = status
else:
================================================================
Index: pld-builder.new/PLD_Builder/rpm_builder.py
diff -u pld-builder.new/PLD_Builder/rpm_builder.py:1.65 pld-builder.new/PLD_Builder/rpm_builder.py:1.66
--- pld-builder.new/PLD_Builder/rpm_builder.py:1.65 Sun Aug 10 23:35:00 2008
+++ pld-builder.new/PLD_Builder/rpm_builder.py Fri Feb 27 18:45:07 2009
@@ -103,6 +103,7 @@
tmpdir = "/tmp/B." + b.b_id[0:6]
if res:
b.log_line("error: installing src rpm failed")
+ res = "FAIL_SRPM_INSTALL"
res = 1
else:
prepare_env()
@@ -115,13 +116,14 @@
(tmpdir, config.nice, rpmbuild_opt, b.spec)
res = chroot.run(cmd, logfile = b.logfile)
if res != 0:
+ res = "UNSUPP"
b.log_line("error: build arch check (%s) failed" % cmd)
if not res:
if ("no-install-br" not in r.flags) and not install.uninstall_self_conflict(b):
- res = 1
+ res = "FAIL_DEPS_UNINSTALL"
if ("no-install-br" not in r.flags) and not install.install_br(r, b):
- res = 1
+ res = "FAIL_DEPS_INSTALL"
if not res:
cmd = "cd rpm/SPECS; TMPDIR=%s nice -n %s rpmbuild -bb %s %s" % \
(tmpdir, config.nice, rpmbuild_opt, b.spec)
@@ -129,10 +131,11 @@
res = chroot.run(cmd, logfile = b.logfile)
files = util.collect_files(b.logfile)
if len(files) > 0:
+ res = "OK"
r.chroot_files.extend(files)
else:
b.log_line("error: No files produced.")
- res = 1 # FIXME: is it error?
+ res = "FAIL_NOFILES"
b.files = files
chroot.run("rm -rf %s; cd rpm/SPECS; rpmbuild --nodeps --nobuild " \
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/pld-builder.new/PLD_Builder/build.py?r1=1.9&r2=1.10&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/pld-builder.new/PLD_Builder/request.py?r1=1.52&r2=1.53&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/pld-builder.new/PLD_Builder/rpm_builder.py?r1=1.65&r2=1.66&f=u
More information about the pld-cvs-commit
mailing list