X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Fannounce.py;h=6c0fd374186aed603dfc74e7ebeab90a6e034acb;hb=8e09061bd7ee0d0f02e71302ccdadbb0df9d8eea;hp=51a07d90f99965edd8eb464c49221997999249cf;hpb=f7624a346a5430ff29425204047f45b6291b1de8;p=dak.git diff --git a/daklib/announce.py b/daklib/announce.py index 51a07d90..6c0fd374 100644 --- a/daklib/announce.py +++ b/daklib/announce.py @@ -109,7 +109,7 @@ def announce_accept(upload): cnf = Config() subst = _subst_for_upload(upload) - accepted_to_real_suite = any(suite.policy_queue is None for suite in upload.suites) + accepted_to_real_suite = any(suite.policy_queue is None or suite in upload.from_policy_suites for suite in upload.suites) suite_names = [] for suite in upload.suites: @@ -127,15 +127,14 @@ def announce_accept(upload): # senf mail to announce lists and tracking server announce = set() for suite in upload.suites: - if suite.policy_queue is None: - continue - announce.update(suite.announce or []) + if suite.policy_queue is None or suite in upload.from_policy_suites: + announce.update(suite.announce or []) announce_list_address = ", ".join(announce) tracking = cnf.get('Dinstall::TrackingServer') if tracking: - announce_list_address = "{0}\n{1}@{2}".format(announce_list_address, upload.source, tracking) + announce_list_address = "{0}\nBcc: {1}@{2}".format(announce_list_address, upload.source, tracking) if len(announce_list_address) != 0: my_subst = subst.copy() @@ -144,12 +143,14 @@ def announce_accept(upload): message = TemplateSubst(my_subst, os.path.join(cnf['Dir::Templates'], 'process-unchecked.announce')) send_mail(message) - if accepted_to_real_suite and upload.sourceful and cnf.find_b('Dinstall::CloseBugs'): + close_bugs_default = cnf.find_b('Dinstall::CloseBugs') + close_bugs = any(s.close_bugs if s.close_bugs is not None else close_bugs_default for s in upload.suites) + if accepted_to_real_suite and upload.sourceful and close_bugs: for bug in upload.bugs: my_subst = subst.copy() my_subst['__BUG_NUMBER__'] = str(bug) - message = TemplateSubst(subst, os.path.join(cnf['Dir::Templates'], 'process-unchecked.bug-close')) + message = TemplateSubst(my_subst, os.path.join(cnf['Dir::Templates'], 'process-unchecked.bug-close')) send_mail(message) def announce_new(upload):