submittodebian: Use --include instead of --attach when not using reportbug's

internal MUA.
This commit is contained in:
Stefano Rivera 2012-07-02 15:05:39 +02:00
parent a8a1eef67a
commit 0a5812f168
2 changed files with 19 additions and 3 deletions

7
debian/changelog vendored
View File

@ -1,7 +1,10 @@
ubuntu-dev-tools (0.144) quantal; urgency=low
* Use dpkg-buildpackage instead of debuild in submittodebian. It really
doesn't need to run lintian twice.
* submittodebian:
- Use dpkg-buildpackage instead of debuild. It really doesn't need to run
lintian twice.
- Use --include instead of --attach when not using reportbug's internal
MUA.
-- Stefano Rivera <stefanor@ubuntu.com> Mon, 02 Jul 2012 13:20:29 +0200

View File

@ -153,6 +153,19 @@ def submit_bugreport(body, debdiff, deb_version, changelog):
'.*REPLACE THIS WITH ACTUAL INFORMATION.*')
env['UDT_EDIT_WRAPPER_FILE_DESCRIPTION'] = 'bug report'
# In external mua mode, attachments are lost (Reportbug bug: #679907)
internal_mua = True
for cfgfile in ('/etc/reportbug.conf', '~/.reportbugrc'):
cfgfile = os.path.expanduser(cfgfile)
if not os.path.exists(cfgfile):
continue
with open(cfgfile, 'r') as f:
for line in f:
line = line.strip()
if line in ('gnus', 'mutt', 'nmh') or line.startswith('mua '):
internal_mua = False
break
cmd = ('reportbug',
'--no-check-available',
'--no-check-installed',
@ -160,9 +173,9 @@ def submit_bugreport(body, debdiff, deb_version, changelog):
'--pseudo-header', 'Usertags: origin-ubuntu %s ubuntu-patch'
% devel,
'--tag', 'patch',
'--attach', debdiff,
'--bts', 'debian',
'--include', body,
'--attach' if internal_mua else '--include', debdiff,
'--package-version', deb_version,
changelog.package)
check_call(cmd, env=env)