[Extras-cauldron-commits] r154 - trunk/buildme/tools
ed_ at garage.maemo.org
ed_ at garage.maemo.org
Sun Sep 6 23:29:20 EEST 2009
Author: ed_
Date: 2009-09-06 23:29:13 +0300 (Sun, 06 Sep 2009)
New Revision: 154
Modified:
trunk/buildme/tools/buildme
Log:
started implementation of multiple packages builds
Modified: trunk/buildme/tools/buildme
===================================================================
--- trunk/buildme/tools/buildme 2009-09-06 19:51:33 UTC (rev 153)
+++ trunk/buildme/tools/buildme 2009-09-06 20:29:13 UTC (rev 154)
@@ -3,7 +3,7 @@
#
# buildme - builder for Maemo Extras
#
-# Copyright (C) 2008 Ed Bartosh <bartosh at gmail.com>
+# Copyright (C) 2008,2009 Ed Bartosh <bartosh at gmail.com>
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License version 2 as published by the
@@ -227,12 +227,17 @@
incoming = conf.get(product, 'incoming_dir')
- fnames = [fname for (_, fname) in sorted([(os.stat(fname).st_mtime, fname) for fname in \
- glob(os.path.join(incoming, '*.changes'))])]
+ fnames = [fname for (_, fname) in sorted(\
+ [(os.stat(fname).st_mtime, fname) for fname in glob(os.path.join(incoming, '*.changes'))] + \
+ [(os.stat(os.path.join(incoming, fdir)).st_mtime, os.path.join(incoming, fdir)) \
+ for fdir in os.listdir(incoming) \
+ if os.path.isdir(os.path.join(incoming, fdir)) and \
+ os.path.exists(os.path.join(incoming, fdir, 'buildme!'))])]
+
if not fnames:
return FSM.NEXT
else:
- logger.debug("Found .changes files: %s" % fnames)
+ logger.debug("Found build candidates: %s" % fnames)
env.params['fnames'] = fnames
# flush ml_handler to send previous messages if any
@@ -307,10 +312,15 @@
# env.params['ml_handler'].flush()
uploader = pwd.getpwuid(os.stat(fname).st_uid).pw_name
- info = "Processing package %s. Uploader: %s, builder: %s" % \
- (' '.join(os.path.basename(fname).split('_')[:2]),
- uploader, destination.user)
+ if os.path.isdir(fname):
+ item = os.path.basename(fname)
+ else:
+ item = ' '.join(os.path.basename(fname).split('_')[:2])
+
+ info = "Processing %s. Uploader: %s, builder: %s" % \
+ (item, uploader, destination.user)
+
handler = create_uploader_handler(logger, uploader, builder_email,
Subject(env))
logger.info(info)
More information about the Extras-cauldron-commits
mailing list