(srcpkg, release) = sys.argv[1:]
(cur_ver, component) = cur_version_component(srcpkg, release)
+# TODO: figure this out from packages.qa.debian.org; changelogs.d.n only works
+# for main ATM anyway, though
+debiancomponent = 'main'
# generate bug report
report = ''
''' % srcpkg
-report += 'Please sync %s (%s) from Debian unstable.\n' % (srcpkg, component)
+report += 'Please sync %s (%s) from Debian unstable (%s).\n' % (srcpkg, component, debiancomponent)
+ubuntuchanges = False
base_ver = cur_ver
uidx = base_ver.find('ubuntu')
if uidx > 0:
base_ver = base_ver[:uidx]
- report += '\nOverriding Ubuntu changes is ok.\n'
+ ubuntuchanges = True
if changelog:
uidx = base_ver.find('build')
mail = '''From: %s
To: %s
-Subject: Please sync %s (%s) from unstable
+Subject: Please sync %s (%s) from unstable (%s)
-%s''' % (myemailaddr, to, srcpkg, component, signed_report)
+%s''' % (myemailaddr, to, srcpkg, component, debiancomponent, signed_report)
print mail
+
print 'Press enter to file this bug, Control-C to abort'
sys.stdin.readline()
-s = smtplib.SMTP()
-s.connect()
+s = smtplib.SMTP('fiordland.ubuntu.com')
s.sendmail(myemailaddr, to, mail)
-s.close()
+s.quit()
+
+if ubuntuchanges:
+ print 'You need to write a followup bug comment with some short explanation of the Ubuntu delta and why it can be dropped.'
+