[Extras-cauldron-commits] r114 - in trunk/buildme: . debian tools

ed_ at garage.maemo.org ed_ at garage.maemo.org
Sat Oct 18 17:16:37 EEST 2008


Author: ed_
Date: 2008-10-18 17:16:37 +0300 (Sat, 18 Oct 2008)
New Revision: 114

Modified:
   trunk/buildme/TODO
   trunk/buildme/debian/changelog
   trunk/buildme/tools/buildme
Log:
* Fix: wrong subject (from another package) in report emails 
  when package is skipped 
* Minor style improvements

Modified: trunk/buildme/TODO
===================================================================
--- trunk/buildme/TODO	2008-10-18 14:09:53 UTC (rev 113)
+++ trunk/buildme/TODO	2008-10-18 14:16:37 UTC (rev 114)
@@ -3,10 +3,9 @@
 1. Fix 2 bugs: (medium)
    https://garage.maemo.org/tracker/index.php?func=detail&aid=2661&group_id=602&atid=2262
    https://bugs.maemo.org/show_bug.cgi?id=3488
-2. Fix: wrong subject (from another package) in report emails when package skipped (easy)
-3. Report problems with packages that have dependencies only available in SDK repo (medium)
-4. Report problems with packages which are breaking SSU (medium)
-5. Implement categories check (easy)
+2. Report problems with packages that have dependencies only available in SDK repo (medium)
+3. Report problems with packages which are breaking SSU (medium)
+4. Implement categories check (easy)
 
 Second priority:
 ---------------

Modified: trunk/buildme/debian/changelog
===================================================================
--- trunk/buildme/debian/changelog	2008-10-18 14:09:53 UTC (rev 113)
+++ trunk/buildme/debian/changelog	2008-10-18 14:16:37 UTC (rev 114)
@@ -1,3 +1,11 @@
+buildme (1.4.4) unstable; urgency=low
+
+  * Fix: wrong subject (from another package) in report emails 
+    when package is skipped 
+  * Minor style improvements
+
+ -- Ed Bartosh <bartosh at gmail.com>  Sat, 18 Oct 2008 17:13:47 +0300
+
 buildme (1.4.3) unstable; urgency=low
 
   * removed requirement for signed packages 
@@ -10,7 +18,7 @@
   * buildme: check for split results when splitting dsc name
 
  -- Ed Bartosh <bartosh at gmail.com>  Thu, 22 May 2008 00:08:21 +0300
-
+ 
 buildme (1.4.1) unstable; urgency=low
 
   * fixed wrong parameter in reject_fname call 

Modified: trunk/buildme/tools/buildme
===================================================================
--- trunk/buildme/tools/buildme	2008-10-18 14:09:53 UTC (rev 113)
+++ trunk/buildme/tools/buildme	2008-10-18 14:16:37 UTC (rev 114)
@@ -49,8 +49,6 @@
 from buildlib.app import App
 from buildlib.logger import CustomLogger, create_uploader_handler, create_ml_handler, create_summary_handler
 
-REJECTED = 'REJECTED'
-
 class UserLock(Lockf):
     """ Lock for user """
     
@@ -130,37 +128,37 @@
 
         env = self.env
 
-        if 'rcode' not in env.params:
-            build_status = 'UNKNOWN'
+        if "rcode" not in env.params:
+            build_status = "UNKNOWN"
         else:
 
-            if env.params['rcode']:
-                if env.params['rcode'] == REJECTED:
-                    build_status = REJECTED
+            if env.params["rcode"]:
+                if env.params["rcode"] == "REJECTED":
+                    build_status = "REJECTED"
                 else:
                     build_status = "FAILED"
             else:
                 build_status = "OK"
 
-        splitted = os.path.splitext(os.path.basename(env.params['fname']))[0].split('_')
+        splitted = os.path.splitext(os.path.basename(env.params["fname"]))[0].split("_")
         if len(splitted) == 2:
             package, version = splitted
         else:
             package = splitted[0]
             version = ""
 
-        return env.params['conf'].get(env.params['product'], 'subject_template', False,
-                        {'package' : package, 'version' : version, 'build_status' : build_status})
+        return env.params["conf"].get(env.params["product"], "subject_template", False,
+                        {"package" : package, "version" : version, "build_status" : build_status})
 
 def reject_fname(env, message):
     """ Move files to 'rejected' subdirectory. """
 
-    env.params['rcode'] = REJECTED
-    env.params['logger'].fatal("REJECTED: %s" % message)
+    env.params["rcode"] = "REJECTED"
+    env.params["logger"].fatal("REJECTED: %s" % message)
 
-    fname = env.params['fname']
+    fname = env.params["fname"]
     incoming = os.path.dirname(fname)
-    rejected_dir = os.path.join(incoming, 'rejected')
+    rejected_dir = os.path.join(incoming, "rejected")
 
     # create 'rejected' subdirectory if needed
     if not os.path.isdir(rejected_dir):
@@ -177,7 +175,11 @@
     except:
         pass
 
-    # Move them into 'rejected' dir
+    # flush ml_handler to send messages about previous fname if any
+    if env.params['ml_handler']:
+        env.params['ml_handler'].flush()
+
+    # Move them into "rejected" dir
     for name in fnames:
         try:
             if os.path.exists(name):
@@ -290,8 +292,8 @@
     builder_email = conf.get(product, 'builder_email')
 
     # flush ml_handler to send messages about previous fname
-    if env.params['ml_handler']:
-        env.params['ml_handler'].flush()
+    #if env.params['ml_handler']:
+    #    env.params['ml_handler'].flush()
 
     uploader = pwd.getpwuid(os.stat(fname).st_uid).pw_name
     info = "Processing package %s. Uploader: %s, builder: %s" % \



More information about the Extras-cauldron-commits mailing list