=== modified file 'lib/lp/soyuz/mail/packageupload.py'
--- lib/lp/soyuz/mail/packageupload.py 2015-09-02 12:05:15 +0000
+++ lib/lp/soyuz/mail/packageupload.py 2016-10-14 20:47:45 +0000
@@ -148,6 +148,8 @@ def fetch_information(spr, bprs, changes
changes.get('Maintainer'), 'Maintainer')
except ParseMaintError:
pass
+ notify_changed_by = changes.get(
+ 'Launchpad-Notify-Changed-By', '') == 'yes'
elif spr or bprs:
if not spr and bprs:
spr = bprs[0].build.source_package_release
@@ -160,12 +162,14 @@ def fetch_information(spr, bprs, changes
maintainer = (
spr.maintainer.displayname,
spr.maintainer.preferredemail.email)
+ notify_changed_by = False
return {
'changelog': changelog,
'date': date,
'changedby': changedby,
'maintainer': maintainer,
+ 'notify_changed_by': notify_changed_by,
}
@@ -343,7 +347,7 @@ class PackageUploadMailer(BaseMailer):
# confuse them.
pass
else:
- # If this is not a PPA, we also consider maintainer and changed-by.
+ # If this is not a PPA, we also consider maintainer.
if blamee is not None:
if is_valid_uploader(maintainer, distroseries.distribution):
debug(logger, "Adding maintainer to recipients")
@@ -352,6 +356,10 @@ class PackageUploadMailer(BaseMailer):
PackageUploadRecipientReason.forMaintainer,
logger=logger)
+ # If this is not a PPA, or if the "Launchpad-Notify-Changed-By:
+ # yes" field is set in the .changes file, we also consider
+ # changed-by.
+ if blamee is not None or info['notify_changed_by']:
if is_valid_uploader(changer, distroseries.distribution):
debug(logger, "Adding changed-by to recipients")
add_recipient(