- if upload.final_suites is None or len(upload.final_suites) == 0:
- suite_name = '(unknown)'
- else:
- suite_names = []
- for suite in upload.final_suites:
- if suite.policy_queue:
- suite_names.append("{0}->{1}".format(suite.suite_name, suite.policy_queue.queue_name))
- else:
- suite_names.append(suite.suite_name)
- suite_name = ','.join(suite_names)
-
- maintainer_field = control.get('Maintainer', cnf['Dinstall::MyEmailAddress'])
- changed_by_field = control.get('Changed-By', maintainer_field)
- maintainer = fix_maintainer(changed_by_field)
- if upload.changes.source is not None:
- addresses = utils.mail_addresses_for_upload(maintainer_field, changed_by_field, changes.primary_fingerprint)
- else:
- addresses = utils.mail_addresses_for_upload(maintainer_field, maintainer_field, changes.primary_fingerprint)
-
- # debian-{devel-,}-changes@lists.debian.org toggles writes access based on this header
- bcc = 'X-DAK: dak process-upload'
- if 'Dinstall::Bcc' in cnf:
- bcc = '{0}\nBcc: {1}'.format(bcc, cnf['Dinstall::Bcc'])
-
- subst = {
- '__DISTRO__': cnf['Dinstall::MyDistribution'],
- '__ADMIN_ADDRESS__': cnf['Dinstall::MyAdminAddress'],
-
- '__CHANGES_FILENAME__': upload.changes.filename,
-
- '__SOURCE__': control.get('Source', '(unknown)'),
- '__ARCHITECTURE__': control.get('Architecture', '(unknown)'),
- '__VERSION__': control.get('Version', '(unknown)'),