mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-13 08:01:09 +00:00
requestsync: move the remaining code of cur_version_component() into the
__main__ code.
This commit is contained in:
parent
ea3c45cb16
commit
ec92bb5d75
24
requestsync
24
requestsync
@ -92,17 +92,6 @@ def checkExistingReports(package):
|
|||||||
"please press enter."
|
"please press enter."
|
||||||
raw_input_exit_on_ctrlc()
|
raw_input_exit_on_ctrlc()
|
||||||
|
|
||||||
def cur_version_component(sourcepkg, release):
|
|
||||||
|
|
||||||
try:
|
|
||||||
src = getUbuntuSrcPkg(sourcepkg, release)
|
|
||||||
return (src.getVersion(), src.getComponent())
|
|
||||||
|
|
||||||
except udtexceptions.PackageNotFoundException:
|
|
||||||
|
|
||||||
print "%s doesn't appear to exist in %s, specify -n for a package not in Ubuntu." % (sourcepkg, release)
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
def mail_bug(source_package, subscribe, status, bugtitle, bugtext, keyid = None):
|
def mail_bug(source_package, subscribe, status, bugtitle, bugtext, keyid = None):
|
||||||
'''Submit the sync request per email.
|
'''Submit the sync request per email.
|
||||||
Return True if email successfully send, otherwise False.'''
|
Return True if email successfully send, otherwise False.'''
|
||||||
@ -265,8 +254,17 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
(cur_ver, component) = ('0', 'universe') # Let's assume universe
|
(cur_ver, component) = ('0', 'universe') # Let's assume universe
|
||||||
|
|
||||||
# Find Ubuntu release's package version.
|
# Find Ubuntu release's package version.
|
||||||
if not newsource: (cur_ver, component) = cur_version_component(srcpkg, release)
|
try:
|
||||||
|
ubuntusrcpkg = getUbuntuSrcPkg(srcpkg, release)
|
||||||
|
cur_ver = ubuntusrcpkg.getVersion()
|
||||||
|
component = ubuntusrcpkg.getComponent()
|
||||||
|
except udtexceptions.PackageNotFoundException:
|
||||||
|
if not newsource:
|
||||||
|
print "'%s' doesn't exist in 'Ubuntu %s'.\nDo you want to sync a new package?" % \
|
||||||
|
(srcpkg, release)
|
||||||
|
raw_input_exit_on_ctrlc('Press [Enter] to continue or [Ctrl-C] to abort. ')
|
||||||
|
newsource = True # TODO: set it for now, but check code if it's needed
|
||||||
|
|
||||||
debsrcpkg = getDebianSrcPkg(srcpkg, distro)
|
debsrcpkg = getDebianSrcPkg(srcpkg, distro)
|
||||||
debiancomponent = debsrcpkg.getComponent()
|
debiancomponent = debsrcpkg.getComponent()
|
||||||
|
@ -65,7 +65,7 @@ def postBug(srcpkg, subscribe, status, bugtitle, bugtext):
|
|||||||
'''
|
'''
|
||||||
|
|
||||||
print 'The final report is:\nSummary: %s\nDescription:\n%s\n' % (bugtitle, bugtext)
|
print 'The final report is:\nSummary: %s\nDescription:\n%s\n' % (bugtitle, bugtext)
|
||||||
raw_input_exit_on_ctrlc('Press [Enter] to continue and [Ctrl-C] to abort. ')
|
raw_input_exit_on_ctrlc('Press [Enter] to continue or [Ctrl-C] to abort. ')
|
||||||
|
|
||||||
if srcpkg:
|
if srcpkg:
|
||||||
bug_target = DistributionSourcePackage(
|
bug_target = DistributionSourcePackage(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user