'__BUG_SERVER__': cnf.get('Dinstall::BugServer'),
- # TODO: don't use private member
- '__FILE_CONTENTS__': upload.changes._signed_file.contents,
-
- # __REJECT_MESSAGE__
+ '__FILE_CONTENTS__': open(upload.changes.path, 'r').read(),
}
override_maintainer = cnf.get('Dinstall::OverrideMaintainer')
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 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)
- message = utils.TemplateSubst(subst, os.path.join(cnf['Dir::Templates'], 'process-unchecked.announce'))
- utils.send_mail(message)
+ 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)
+
+ 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)
+
+ subst['__ANNOUNCE_LIST_ADDRESS__'] = announce_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.
for fn in files:
src = os.path.join(upload.directory, fn)
dst = utils.find_next_free(os.path.join(rejectdir, fn))
+ if not os.path.exists(src):
+ continue
fs.copy(src, dst)
if upload.reject_reasons is not None: