]> git.decadent.org.uk Git - dak.git/commitdiff
Merge remote-tracking branch 'ansgar/pu/multiarchive-2'
authorJoerg Jaspert <joerg@debian.org>
Sun, 12 Aug 2012 13:32:53 +0000 (15:32 +0200)
committerJoerg Jaspert <joerg@debian.org>
Sun, 12 Aug 2012 13:32:53 +0000 (15:32 +0200)
* ansgar/pu/multiarchive-2:
  dak/process_upload.py: only send mail to tracking server if accepted to real suite
  templates/process-unchecked.accepted: use only defined subst variables

Signed-off-by: Joerg Jaspert <joerg@debian.org>
dak/process_upload.py
templates/process-unchecked.accepted

index 74229e2f482b46d5f58ee351886766c6699bd4ca..bea8a10ec49a01988e71068b6dbca0db716b340e 100755 (executable)
@@ -302,24 +302,23 @@ def accept(directory, upload):
     utils.send_mail(message)
 
     # send mail to announce lists and tracking server
-    subst = subst_for_upload(upload)
-    announce = set()
-    for suite in upload.final_suites:
-        if suite.policy_queue is not None:
-            continue
-        announce.update(suite.announce or [])
-    announce_address = ", ".join(announce)
-
-    tracking = cnf.get('Dinstall::TrackingServer')
-    if tracking and 'source' in upload.changes.architectures:
-        announce_address = '{0}\nBcc: {1}@{2}'.format(announce_address, control['Source'], tracking)
+    if  accepted_to_real_suite:
+        subst = subst_for_upload(upload)
+        announce = set()
+        for suite in upload.final_suites:
+            if suite.policy_queue is not None:
+                continue
+            announce.update(suite.announce or [])
+        announce_address = ", ".join(announce)
 
-    subst['__ANNOUNCE_LIST_ADDRESS__'] = announce_address
+        tracking = cnf.get('Dinstall::TrackingServer')
+        if tracking and 'source' in upload.changes.architectures:
+            announce_address = '{0}\nBcc: {1}@{2}'.format(announce_address, control['Source'], tracking)
 
-    message = utils.TemplateSubst(subst, os.path.join(cnf['Dir::Templates'], 'process-unchecked.announce'))
-    utils.send_mail(message)
+        subst['__ANNOUNCE_LIST_ADDRESS__'] = announce_address
 
-    del subst['__ANNOUNCE_LIST_ADDRESS__']
+        message = utils.TemplateSubst(subst, os.path.join(cnf['Dir::Templates'], 'process-unchecked.announce'))
+        utils.send_mail(message)
 
     # Only close bugs for uploads that were not redirected to a policy queue.
     # process-policy will close bugs for those once they are accepted.
index 09b5e0c9e8b45b3b5150df2316669cade581fa94..0fc0318b9fecd391338ea993062ee2b9f8b55d64 100644 (file)
@@ -9,8 +9,7 @@ Content-Type: text/plain; charset="utf-8"
 Content-Transfer-Encoding: 8bit
 Subject: __CHANGES_FILENAME__ ACCEPTED into __SUITE__
 
-__REJECT_MESSAGE__
 Accepted:
-__SUMMARY__
+__FILE_CONTENTS__
 
 Thank you for your contribution to __DISTRO__.