mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-04-21 07:11:14 +00:00
submittodebian: Check existing bug reports before editing anything.
This commit is contained in:
parent
9c20cc13a3
commit
ff9305976b
1
debian/changelog
vendored
1
debian/changelog
vendored
@ -18,6 +18,7 @@ ubuntu-dev-tools (0.137) UNRELEASED; urgency=low
|
||||
* mk-sbuild, pbuilder-dist, ubuntu-build: Add armhf.
|
||||
* pull-debian-source, pull-lp-source: Resolve the source package (via DDE),
|
||||
if a binary package was requested (LP: #617349)
|
||||
* submittodebian: Check existing bug reports before editing anything.
|
||||
|
||||
[ Andreas Moog ]
|
||||
* sponsor-patch: Check permission to unsubscribe sponsors-team (LP: #896884)
|
||||
|
@ -30,7 +30,7 @@ from tempfile import mkdtemp
|
||||
from distro_info import UbuntuDistroInfo
|
||||
|
||||
from ubuntutools.config import ubu_email
|
||||
from ubuntutools.question import YesNoQuestion, EditFile
|
||||
from ubuntutools.question import YesNoQuestion, EditFile, confirmation_prompt
|
||||
from ubuntutools.subprocess import call, check_call, Popen, PIPE
|
||||
|
||||
try:
|
||||
@ -118,12 +118,32 @@ def check_file(fname, critical = True):
|
||||
|
||||
def submit_bugreport(body, debdiff, deb_version, changelog):
|
||||
devel = UbuntuDistroInfo().devel()
|
||||
cmd = ('reportbug', '-P', 'User: ubuntu-devel@lists.ubuntu.com',
|
||||
'-P', 'Usertags: origin-ubuntu %s ubuntu-patch' % devel,
|
||||
'-T', 'patch', '-A', debdiff, '-B', 'debian', '-i', body,
|
||||
'-V', deb_version, changelog.package)
|
||||
cmd = ('reportbug',
|
||||
'--no-check-available',
|
||||
'--no-check-installed',
|
||||
'--no-query-bts',
|
||||
'--pseudo-header', 'User: ubuntu-devel@lists.ubuntu.com',
|
||||
'--pseudo-header', 'Usertags: origin-ubuntu %s ubuntu-patch' % devel,
|
||||
'--tag', 'patch',
|
||||
'--attach', debdiff,
|
||||
'--bts', 'debian',
|
||||
'--include', body,
|
||||
'--package-version', deb_version,
|
||||
changelog.package)
|
||||
check_call(cmd)
|
||||
|
||||
def check_existing_bugreports(package, deb_version):
|
||||
print "Checking existing bug reports first."
|
||||
print
|
||||
cmd = ('reportbug',
|
||||
'--no-check-available',
|
||||
'--no-check-installed',
|
||||
'--query-only',
|
||||
'--bts', 'debian',
|
||||
'--package-version', deb_version, package)
|
||||
check_call(cmd)
|
||||
confirmation_prompt(action='continue filing this bug')
|
||||
|
||||
def check_reportbug_config():
|
||||
fn = os.path.expanduser('~/.reportbugrc')
|
||||
if os.path.exists(fn):
|
||||
@ -173,6 +193,8 @@ def main():
|
||||
deb_version = get_most_recent_debian_version(changelog)
|
||||
bug_body = get_bug_body(changelog)
|
||||
|
||||
check_existing_bugreports(changelog.package, deb_version)
|
||||
|
||||
tmpdir = mkdtemp()
|
||||
body = os.path.join(tmpdir, 'bug_body')
|
||||
fp = open(body, 'w')
|
||||
|
Loading…
x
Reference in New Issue
Block a user