]> git.decadent.org.uk Git - dak.git/blobdiff - dak/process_unchecked.py
clean-suites: Remove trailing whitespace
[dak.git] / dak / process_unchecked.py
index 11bbfef9ab564f368b3e877b59aec523fef9abe8..cabdbf3f6f914738f2ad4bf0a6f14d9bf28578e4 100755 (executable)
@@ -122,7 +122,9 @@ def usage (exit_code=0):
 
 ################################################################################
 
-def action ():
+def action(u):
+    cnf = Config()
+
     # changes["distribution"] may not exist in corner cases
     # (e.g. unreadable changes files)
     if not u.pkg.changes.has_key("distribution") or not isinstance(u.pkg.changes["distribution"], DictType):
@@ -222,7 +224,10 @@ def package_to_suite(u, suite):
         q = q.join(DBSource).filter_by(source=u.pkg.changes['source'])
         q = q.filter_by(version=u.pkg.changes['version']).limit(1)
 
-        if q.count() < 1:
+        # NB: Careful, this logic isn't what you would think it is
+        # Source is already in {old-,}proposed-updates so no need to hold
+        # Instead, we don't move to the holding area, we just do an ACCEPT
+        if q.count() > 0:
             ret = False
 
         s.close()
@@ -425,6 +430,7 @@ def acknowledge_new(u, summary, short_summary):
     if not Options["No-Mail"]:
         print "Sending new ack."
         template = os.path.join(cnf["Dir::Templates"], 'process-unchecked.new')
+        u.update_subst()
         u.Subst["__SUMMARY__"] = summary
         new_ack_message = utils.TemplateSubst(u.Subst, template)
         utils.send_mail(new_ack_message)
@@ -493,7 +499,7 @@ def process_it(changes_file):
             valid_changes_p = u.load_changes(changespath)
         else:
             valid_changes_p = False
-           u.rejects.extend(rejects)
+            u.rejects.extend(rejects)
 
         if valid_changes_p:
             while u.reprocess: