]> err.no Git - dak/commitdiff
automatically process binary uploads to proposed-updates when source is already present
authorAnthony Towns <aj@azure.humbug.org.au>
Mon, 31 Jul 2006 05:46:46 +0000 (15:46 +1000)
committerAnthony Towns <aj@azure.humbug.org.au>
Mon, 31 Jul 2006 05:46:46 +0000 (15:46 +1000)
dak/process_unchecked.py

index cf60312410719941621f5b1e2a23ffd72ca4ed83..665528a7c32d530fc7be4e2a129f497a5729be60 100755 (executable)
@@ -1188,9 +1188,20 @@ def queue_embargo (summary):
 ################################################################################
 
 def is_stableupdate ():
-    if changes["distribution"].has_key("proposed-updates"):
-       return 1
-    return 0
+    if not changes["distribution"].has_key("proposed-updates"):
+       return 0
+
+    if not changes["architecture"].has_key("source"):
+        pusuite = database.get_suite_id("proposed-updates")
+        q = Upload.projectB.query(
+          "SELECT S.source FROM source s JOIN src_associations sa ON (s.id = sa.source) WHERE s.source = '%s' AND s.version = '%s' AND sa.suite = %d" % 
+          (changes["source"], changes["version"], pusuite))
+        ql = q.getresult()
+        if ql:
+            # source is already in proposed-updates
+            return 0
+
+    return 1
 
 def do_stableupdate (summary):
     print "Moving to PROPOSED-UPDATES holding area."