[Pkg-debile-commits] [debile-master] 32/126: fixing the jobs

Sylvestre Ledru sylvestre at alioth.debian.org
Mon Aug 19 14:56:09 UTC 2013


This is an automated email from the git hooks/post-receive script.

sylvestre pushed a commit to branch scan-build-html
in repository debile-master.

commit e04dc7e827a2a6d9eda2a13471f6f37a0d5f380a
Author: Paul Tagliamonte <tag at pault.ag>
Date:   Sun May 26 23:34:25 2013 -0400

    fixing the jobs
---
 lucy/incoming.py |   18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/lucy/incoming.py b/lucy/incoming.py
index 41b9dfd..a276c73 100644
--- a/lucy/incoming.py
+++ b/lucy/incoming.py
@@ -57,15 +57,25 @@ def accept_source(config, changes):
     obj.save()
 
     print("ACCEPT: {source}/{version} for {owner} as {_id}".format(**obj))
-    add_jobs(obj, 'source', config['job_classes']['source'])
+    add_jobs(obj, 'source', config, 'source')
 
 
-def add_jobs(package, package_type, types):
-    for type in types:
+def add_jobs(package, package_type, config, klass):
+    for type in config['job_classes'][klass]:
         j = Job(package=package['_id'],
                 package_type=package_type,
                 type=type)
         print("  -> Job: ", j.save(), type)
+    if klass == 'source':
+        # add builds
+        for suite in config['suites']:
+            for arch in config['arches']:
+                j = Job(arch=arch,
+                        suite=suite,
+                        type='build',
+                        package=package['_id'],
+                        package_type=package_type)
+                print("  -> Bin: ", j.save(), arch, suite)
 
 
 def accept_binary(config, changes):
@@ -96,7 +106,7 @@ def accept_binary(config, changes):
                     binaries=[os.path.basename(x) for x in binaries],
                     builder=buildd['_id'])
     binary.save()
-    add_jobs(binary, 'binary', config['job_classes']['binary'])
+    add_jobs(binary, 'binary', config, 'binary')
 
     path = move_to_pool(config, binary['source'], changes, root=arch)
     os.unlink(changes.get_filename())

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-debile/debile-master.git



More information about the Pkg-debile-commits mailing list