mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-16 01:21:07 +00:00
bug fixes
This commit is contained in:
parent
f284ee7cd6
commit
82899a0f45
12
requestsync
12
requestsync
@ -124,9 +124,13 @@ if __name__ == '__main__':
|
|||||||
newsource = True
|
newsource = True
|
||||||
|
|
||||||
# Get the requested Debian source package
|
# Get the requested Debian source package
|
||||||
debian_srcpkg = getDebianSrcPkg(srcpkg, distro)
|
try:
|
||||||
debian_version = Version(debian_srcpkg.getVersion())
|
debian_srcpkg = getDebianSrcPkg(srcpkg, distro)
|
||||||
debian_component = debian_srcpkg.getComponent()
|
debian_version = Version(debian_srcpkg.getVersion())
|
||||||
|
debian_component = debian_srcpkg.getComponent()
|
||||||
|
except udtexceptions.PackageNotFoundException, e:
|
||||||
|
print >> sys.stderr, "E: %s" % e
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
# Debian and Ubuntu versions are the same - stop
|
# Debian and Ubuntu versions are the same - stop
|
||||||
if ubuntu_version == debian_version:
|
if ubuntu_version == debian_version:
|
||||||
@ -136,7 +140,7 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
# -s flag not specified - check if we do need sponsorship
|
# -s flag not specified - check if we do need sponsorship
|
||||||
if not sponsorship:
|
if not sponsorship:
|
||||||
sponsorship = needsSponsorship(srcpkg, ubuntu_component)
|
sponsorship = needSponsorship(srcpkg, ubuntu_component)
|
||||||
|
|
||||||
# Check for existing package reports
|
# Check for existing package reports
|
||||||
if not newsource:
|
if not newsource:
|
||||||
|
@ -34,7 +34,7 @@ def raw_input_exit_on_ctrlc(*args, **kwargs):
|
|||||||
try:
|
try:
|
||||||
return raw_input(*args, **kwargs)
|
return raw_input(*args, **kwargs)
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print 'Abort requested. No sync request filed.'
|
print '\nAbort requested. No sync request filed.'
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
def getDebianChangelog(srcpkg, version):
|
def getDebianChangelog(srcpkg, version):
|
||||||
@ -48,6 +48,9 @@ def getDebianChangelog(srcpkg, version):
|
|||||||
subdir = 'lib%s' % pkgname[3]
|
subdir = 'lib%s' % pkgname[3]
|
||||||
else:
|
else:
|
||||||
subdir = pkgname[0]
|
subdir = pkgname[0]
|
||||||
|
# Strip epoch from version
|
||||||
|
if ':' in pkgversion:
|
||||||
|
pkgversion = pkgversion[pkgversion.find(':')+1:]
|
||||||
|
|
||||||
# Get the debian changelog file from packages.debian.org
|
# Get the debian changelog file from packages.debian.org
|
||||||
try:
|
try:
|
||||||
@ -113,6 +116,8 @@ def edit_report(subject, body, changes_required = False):
|
|||||||
print 'The report has not been changed, but you have to explain why ' \
|
print 'The report has not been changed, but you have to explain why ' \
|
||||||
'the Ubuntu changes can be dropped.'
|
'the Ubuntu changes can be dropped.'
|
||||||
raw_input_exit_on_ctrlc('Press [Enter] to retry or [Control-C] to abort. ')
|
raw_input_exit_on_ctrlc('Press [Enter] to retry or [Control-C] to abort. ')
|
||||||
|
else:
|
||||||
|
changes_required = False
|
||||||
|
|
||||||
report_file.seek(0)
|
report_file.seek(0)
|
||||||
report = report_file.read()
|
report = report_file.read()
|
||||||
|
@ -55,7 +55,7 @@ Your sync request shall require an approval by a member of the appropriate
|
|||||||
sponsorship team, who shall be subscribed to this bug report.
|
sponsorship team, who shall be subscribed to this bug report.
|
||||||
This must be done before it can be processed by a member of the Ubuntu Archive
|
This must be done before it can be processed by a member of the Ubuntu Archive
|
||||||
team.'''
|
team.'''
|
||||||
raw_input_exit_on_ctrlc('If the above is correct please press [Enter]: ')
|
raw_input_exit_on_ctrlc('If the above is correct please press [Enter] ')
|
||||||
|
|
||||||
return need_sponsor
|
return need_sponsor
|
||||||
|
|
||||||
@ -73,10 +73,10 @@ def checkExistingReports(srcpkg):
|
|||||||
# Search bug list for other sync requests.
|
# Search bug list for other sync requests.
|
||||||
for bug in pkgBugList:
|
for bug in pkgBugList:
|
||||||
# check for Sync or sync and the package name
|
# check for Sync or sync and the package name
|
||||||
if 'ync %s' % package in bug.title:
|
if not bug.is_complete and 'ync %s' % srcpkg in bug.title:
|
||||||
print 'The following bug could be a possible duplicate sync bug on Launchpad:'
|
print 'The following bug could be a possible duplicate sync bug on Launchpad:'
|
||||||
print ' * Bug #%i: %s (%s)' % \
|
print ' * %s (%s)' % \
|
||||||
(bug.id, bug.title, translate_api_web(bug.self_link))
|
(bug.title, translate_api_web(bug.self_link))
|
||||||
print 'Please check the above URL to verify this before continuing.'
|
print 'Please check the above URL to verify this before continuing.'
|
||||||
raw_input_exit_on_ctrlc('Press [Enter] to continue or [Ctrl-C] to abort. ')
|
raw_input_exit_on_ctrlc('Press [Enter] to continue or [Ctrl-C] to abort. ')
|
||||||
|
|
||||||
@ -96,7 +96,7 @@ def postBug(srcpkg, subscribe, status, bugtitle, bugtext):
|
|||||||
bug_target = Distribution('ubuntu')
|
bug_target = Distribution('ubuntu')
|
||||||
|
|
||||||
# create bug
|
# create bug
|
||||||
bug = Launchpad.bugs.createBug(title = bugtitle, description = bugtext, target = bug_target)
|
bug = Launchpad.bugs.createBug(title = bugtitle, description = bugtext, target = bug_target())
|
||||||
|
|
||||||
# newly created bugreports have only one task
|
# newly created bugreports have only one task
|
||||||
task = bug.bug_tasks[0]
|
task = bug.bug_tasks[0]
|
||||||
@ -106,7 +106,7 @@ def postBug(srcpkg, subscribe, status, bugtitle, bugtext):
|
|||||||
task.status = status
|
task.status = status
|
||||||
task.lp_save()
|
task.lp_save()
|
||||||
|
|
||||||
bug.subscribe(person = PersonTeam(subscribe))
|
bug.subscribe(person = PersonTeam(subscribe)())
|
||||||
|
|
||||||
print 'Sync request filed as bug #%i: %s' % (bug.id,
|
print 'Sync request filed as bug #%i: %s' % (bug.id,
|
||||||
translate_api_web(bug.self_link))
|
translate_api_web(bug.self_link))
|
||||||
|
@ -31,6 +31,8 @@ __all__ = [
|
|||||||
'getDebianSrcPkg',
|
'getDebianSrcPkg',
|
||||||
'getUbuntuSrcPkg',
|
'getUbuntuSrcPkg',
|
||||||
'getEmailAddress',
|
'getEmailAddress',
|
||||||
|
'needSponsorship',
|
||||||
|
'checkExistingReports',
|
||||||
'mailBug',
|
'mailBug',
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -111,7 +113,7 @@ def needSponsorship(name, component):
|
|||||||
while True:
|
while True:
|
||||||
print "Do you have upload permissions for the '%s' component " \
|
print "Do you have upload permissions for the '%s' component " \
|
||||||
"or the package '%s'?" % (component, name)
|
"or the package '%s'?" % (component, name)
|
||||||
val = raw_input_exit_on_ctrlc("If in doubt answer 'no'. [y/N]? ")
|
val = raw_input_exit_on_ctrlc("If in doubt answer 'n'. [y/N]? ")
|
||||||
if val.lower() in ('y', 'yes'):
|
if val.lower() in ('y', 'yes'):
|
||||||
return False
|
return False
|
||||||
elif val.lower() in ('n', 'no', ''):
|
elif val.lower() in ('n', 'no', ''):
|
||||||
@ -123,7 +125,8 @@ def checkExistingReports(srcpkg):
|
|||||||
'''
|
'''
|
||||||
Point the user to the URL to manually check for duplicate bug reports.
|
Point the user to the URL to manually check for duplicate bug reports.
|
||||||
'''
|
'''
|
||||||
print 'Please check on https://bugs.launchpad.net/ubuntu/+source/%s/+bugs for duplicate sync requests before continuing.'
|
print 'Please check on https://bugs.launchpad.net/ubuntu/+source/%s/+bugs\n' \
|
||||||
|
'for duplicate sync requests before continuing.' % srcpkg
|
||||||
raw_input_exit_on_ctrlc('Press [Enter] to continue or [Ctrl-C] to abort. ')
|
raw_input_exit_on_ctrlc('Press [Enter] to continue or [Ctrl-C] to abort. ')
|
||||||
|
|
||||||
def mailBug(srcpkg, subscribe, status, bugtitle, bugtext, keyid = None):
|
def mailBug(srcpkg, subscribe, status, bugtitle, bugtext, keyid = None):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user