- changes_contents = open(changes_path, 'r').read()
-
- bcc = 'X-DAK: dak process-policy'
- 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.changesname,
- '__SOURCE__': upload.changes.source,
- '__VERSION__': upload.changes.version,
- '__ARCHITECTURE__': upload.changes.architecture,
- '__MAINTAINER__': maintainer_field,
- '__MAINTAINER_FROM__': fix_maintainer(maintainer_field)[1],
- '__MAINTAINER_TO__': ", ".join(addresses),
- '__CC__': 'X-DAK-Rejection: manual or automatic',
- '__REJECTOR_ADDRESS__': cnf['Dinstall::MyEmailAddress'],
- '__BCC__': bcc,
- '__BUG_SERVER__': cnf.get('Dinstall::BugServer'),
- '__FILE_CONTENTS__': changes_contents,
- }
-
- override_maintainer = cnf.get('Dinstall::OverrideMaintainer')
- if override_maintainer:
- subst['__MAINTAINER_TO__'] = override_maintainer
-
- return subst
+ pu.changes = open(changes_path, 'r').read()
+ pu.changes_filename = upload.changes.changesname
+ pu.sourceful = upload.source is not None
+ pu.source = upload.changes.source
+ pu.version = upload.changes.version
+ pu.architecture = upload.changes.architecture
+ pu.bugs = upload.changes.closes
+
+ pu.program = "process-policy"
+
+ return pu