]> git.pld-linux.org Git - projects/pld-builder.new.git/commitdiff
- should work now
authorMichal Moskal <michal@moskal.me>
Tue, 2 Sep 2003 21:34:56 +0000 (21:34 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    PLD_Builder/build.py -> 1.4
    PLD_Builder/report.py -> 1.11
    PLD_Builder/request.py -> 1.21
    PLD_Builder/request_handler.py -> 1.24

PLD_Builder/build.py
PLD_Builder/report.py
PLD_Builder/request.py
PLD_Builder/request_handler.py

index 70b1396809df368b34bb24aab07f6192eb821ad6..aa981abde5236346b3c99b73d5b5d23e8d0c42aa 100644 (file)
@@ -11,15 +11,12 @@ import report
 import log
 import buildlogs
 import status
+from config import config, init_conf
+
 
 def run_command(batch):
   if "no-chroot" in batch.command_flags:
-    user = "root"
-    if "as-builder" in batch.command_flags:
-      user = "builder"
-    return chroot.run(batch.command, logfile = batch.logfile, user = user)
-  else:
-    c = "%s >> %s 2>&1" % (batch.command, logfile)
+    c = "%s >> %s 2>&1" % (batch.command, batch.logfile)
     f = os.popen(c)
     for l in f.xreadlines():
       pass
@@ -28,6 +25,11 @@ def run_command(batch):
       return 0
     else:
       return r
+  else:
+    user = "root"
+    if "as-builder" in batch.command_flags:
+      user = "builder"
+    return chroot.run(batch.command, logfile = batch.logfile, user = user)
 
 def build_all(r, build_fnc):
   status.email = r.requester_email
@@ -49,7 +51,7 @@ def build_all(r, build_fnc):
         failed_dep = dep.spec
     
     if batch.is_command() and can_build:
-      batch.logfile = tmp + batch.spec + ".log"
+      batch.logfile = tmp + "command"
       if config.builder in batch.builders:
         log.notice("running %s" % batch.command)
         stopwatch.start()
index f10220568f3470eaab533acdfe6c740511cd1b3e..3f1a188ed769048eae5653ce5cd93f0c05f714dc 100644 (file)
@@ -81,7 +81,7 @@ def send_report(r, is_src = False):
       info_from_log(b, m)
 
   for b in r.batches:
-    if b.build_failed and b.logfile != None:
+    if (b.is_command () or b.build_failed) and b.logfile != None:
       m.write("\n\n*** buildlog for %s\n" % b.spec)
       m.append_log(b.logfile)
       m.write("\n\n")
index 21bc95467dea33c364629bd52847dc3a74362aab..9787540fef7547ef05360847d6598175ccb4e6d3 100644 (file)
@@ -136,7 +136,8 @@ class Batch:
         self.src_rpm = text(c)
       elif c.nodeName == "spec":
         self.spec = text(c)
-      elif c.nodeName == "command"
+      elif c.nodeName == "command":
+        self.spec = "COMMAND"
         self.command = text(c)
         self.command_flags = string.split(attr(c, "flags", ""))
       elif c.nodeName == "info":
@@ -178,7 +179,7 @@ class Batch:
     f.write("<li>\n")
     if self.is_command():
       desc = "SH: %s [%s]" % (self.command, ' '.join(self.command_flags))
-    else
+    else:
       desc = "%s (%s -R %s %s)" % \
         (self.src_rpm, self.spec, self.branch, self.bconds_string())
     f.write("%s <small>[" % desc)
index 0cc60671188b2bc73627bad7441fa13c95047ad4..054d772fb7ea8ed2b44ffb5d4cc012be327e0928 100644 (file)
@@ -62,7 +62,7 @@ def handle_group(r, user):
       batch.builders.remove(config.builder)
     for bld in batch.builders:
       batch.builders_status[bld] = '?'
-      if bld not in config.binary_builders:
+      if bld not in config.binary_builders and bld != config.builder:
         fail_mail("I (src rpm builder '%s') do not handle binary builder '%s', only '%s'" % \
                         (config.builder, bld, string.join(config.binary_builders)))
         return
This page took 0.036785 seconds and 4 git commands to generate.