]> git.decadent.org.uk Git - dak.git/blobdiff - dak/process_new.py
Merge commit 'stew/master' into merge
[dak.git] / dak / process_new.py
index f79c87ee8f4e91ef42387597af6b15e036a3b4c1..e45dd8b2a47abd2f121abc3172fdca5973c0d721 100755 (executable)
@@ -94,9 +94,9 @@ def recheck():
 
         # Version and file overwrite checks
         if files[f]["type"] == "deb":
-            reject(Upload.check_binary_against_db(f))
+            reject(Upload.check_binary_against_db(f), "")
         elif files[f]["type"] == "dsc":
-            reject(Upload.check_source_against_db(f))
+            reject(Upload.check_source_against_db(f), "")
             (reject_msg, is_in_incoming) = Upload.check_dsc_against_db(f)
             reject(reject_msg, "")
 
@@ -493,15 +493,16 @@ def check_pkg ():
         stdout_fd = sys.stdout
         try:
             sys.stdout = less_fd
-            examine_package.display_changes(Upload.pkg.changes_file)
+            changes = utils.parse_changes (Upload.pkg.changes_file)
+            examine_package.display_changes(changes['distribution'], Upload.pkg.changes_file)
             files = Upload.pkg.files
             for f in files.keys():
                 if files[f].has_key("new"):
                     ftype = files[f]["type"]
                     if ftype == "deb":
-                        examine_package.check_deb(f)
+                        examine_package.check_deb(changes['distribution'], f)
                     elif ftype == "dsc":
-                        examine_package.check_dsc(f)
+                        examine_package.check_dsc(changes['distribution'], f)
         finally:
             sys.stdout = stdout_fd
     except IOError, e:
@@ -822,7 +823,7 @@ def is_source_in_queue_dir(qdir):
         u = queue.Upload(Cnf)
         u.pkg.changes_file = os.path.join(qdir, entry)
         u.update_vars()
-        if not Upload.pkg.changes["architecture"].has_key("source"):
+        if not u.pkg.changes["architecture"].has_key("source"):
             # another binary upload, ignore
             continue
         if Upload.pkg.changes["version"] != u.pkg.changes["version"]:
@@ -844,11 +845,11 @@ def move_to_holding(suite, queue_dir):
 def _accept():
     if Options["No-Action"]:
         return
+    (summary, short_summary) = Upload.build_summaries()
     Upload.accept(summary, short_summary)
     os.unlink(Upload.pkg.changes_file[:-8]+".dak")
 
 def do_accept_stableupdate(suite, q):
-    (summary, short_summary) = Upload.build_summaries()
     queue_dir = Cnf["Dir::Queue::%s" % (q,)]
     if not Upload.pkg.changes["architecture"].has_key("source"):
         # It is not a sourceful upload.  So its source may be either in p-u