]> git.decadent.org.uk Git - dak.git/commitdiff
fill in headers at reject time
authorMark Hymers <mhy@debian.org>
Sat, 5 Dec 2009 20:36:42 +0000 (20:36 +0000)
committerMark Hymers <mhy@debian.org>
Sat, 5 Dec 2009 20:36:42 +0000 (20:36 +0000)
Signed-off-by: Mark Hymers <mhy@debian.org>
dak/process_policy.py

index c23a3cdc24e7a186d46ef2a1d2e097ebd85d5995..16a8810191720f891cec5685b6dd984f0e7ca6e6 100755 (executable)
@@ -94,9 +94,17 @@ def comment_reject(changes_file, srcqueue, comments, session):
 
     u.rejects.append(comments)
 
+    cnf = Config()
+    bcc = "X-DAK: dak process-policy"
+    if cnf.has_key("Dinstall::Bcc"):
+        u.Subst["__BCC__"] = bcc + "\nBcc: %s" % (cnf["Dinstall::Bcc"])
+    else:
+        u.Subst["__BCC__"] = bcc
+
     if not Options["No-Action"]:
         u.do_reject(manual=0, reject_message='\n'.join(u.rejects))
         u.pkg.remove_known_changes(session=session)
+        session.commit()
 
         Logger.log(["Policy Queue REJECT: %s:  %s" % (srcqueue.queue_name, u.pkg.changes_file)])