]> piware.de Git - bin.git/blobdiff - requestsync
add for-archive
[bin.git] / requestsync
index 07592635db7bad7a7ccc43a55087eca6b48e4668..f964d8a0cf75893ceea236aa36193a9213b1f9e1 100755 (executable)
@@ -44,6 +44,9 @@ if len(sys.argv) != 3:
 (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 = ''
@@ -54,7 +57,7 @@ report += ''' affects distros/ubuntu/%s
 
 ''' % 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
@@ -87,19 +90,18 @@ to = 'new@bugs.launchpad.net'
 
 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.'