mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-13 08:01:09 +00:00
Add non-syncpackage, archive-admin-driven sync support to ack-sync, and make it the default
This commit is contained in:
parent
ba54fe6688
commit
57dccd844d
41
ack-sync
41
ack-sync
@ -143,7 +143,7 @@ def unsubscribe_sponsors(launchpad, bug):
|
|||||||
|
|
||||||
|
|
||||||
def main(bug_numbers, all_package, all_version, all_section, update,
|
def main(bug_numbers, all_package, all_version, all_section, update,
|
||||||
all_uploader_email, key, verbose=False, silent=False):
|
all_uploader_email, key, upload, verbose=False, silent=False):
|
||||||
launchpad = get_launchpad("ubuntu-dev-tools")
|
launchpad = get_launchpad("ubuntu-dev-tools")
|
||||||
# TODO: use release-info (once available)
|
# TODO: use release-info (once available)
|
||||||
series = launchpad.distributions["ubuntu"].current_series
|
series = launchpad.distributions["ubuntu"].current_series
|
||||||
@ -235,19 +235,31 @@ def main(bug_numbers, all_package, all_version, all_section, update,
|
|||||||
print bug.title
|
print bug.title
|
||||||
print '%s (was %s)' % (task.status, old_status)
|
print '%s (was %s)' % (task.status, old_status)
|
||||||
print "Uploader:", uploader_name + " <" + uploader_email + ">"
|
print "Uploader:", uploader_name + " <" + uploader_email + ">"
|
||||||
|
if upload:
|
||||||
|
print "Will upload sync directly, rather than subscribing ubuntu-archive"
|
||||||
try:
|
try:
|
||||||
raw_input('Press [Enter] to continue or [Ctrl-C] to abort.')
|
raw_input('Press [Enter] to continue or [Ctrl-C] to abort.')
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
task.status = 'Fix Committed'
|
|
||||||
task.assignee = None
|
|
||||||
print "unassigned me"
|
|
||||||
task.lp_save()
|
|
||||||
bug.subscribe(person=launchpad.me)
|
bug.subscribe(person=launchpad.me)
|
||||||
print "subscribed me"
|
print "subscribed me"
|
||||||
changes_file = dsc_file[:-4] + "_source.changes"
|
if upload:
|
||||||
subprocess.check_call(["dput", "ubuntu", changes_file])
|
task.status = 'Fix Committed'
|
||||||
|
task.assignee = None
|
||||||
|
print "unassigned me"
|
||||||
|
task.lp_save()
|
||||||
|
changes_file = dsc_file[:-4] + "_source.changes"
|
||||||
|
subprocess.check_call(["dput", "ubuntu", changes_file])
|
||||||
|
else:
|
||||||
|
task.status = 'Confirmed'
|
||||||
|
task.assignee = None
|
||||||
|
print "unassigned me"
|
||||||
|
task.lp_save()
|
||||||
|
bug.newMessage(content="Sync request ACK'd", subject="ack-sync")
|
||||||
|
bug.subscribe(person=launchpad.people['ubuntu-archive'])
|
||||||
|
print "subscribed ubuntu-archive"
|
||||||
|
|
||||||
|
|
||||||
def usage():
|
def usage():
|
||||||
print """ack-sync <bug numbers>
|
print """ack-sync <bug numbers>
|
||||||
@ -264,19 +276,23 @@ def usage():
|
|||||||
-S, --with-sbuild use sbuild instead of pbuilder
|
-S, --with-sbuild use sbuild instead of pbuilder
|
||||||
-C, --pbuilder=<command> use <command> as pbuilder
|
-C, --pbuilder=<command> use <command> as pbuilder
|
||||||
-u, --update updates pbuilder before building
|
-u, --update updates pbuilder before building
|
||||||
|
-U, --upload upload the sync immediately rather than ACK-ing it
|
||||||
|
for the archive admins
|
||||||
-v, --verbose be more verbosive
|
-v, --verbose be more verbosive
|
||||||
-V, --version=<version> set the version"""
|
-V, --version=<version> set the version"""
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
try:
|
try:
|
||||||
long_opts = ["help", "key=", "lvm=", "package=", "section=", "silent", "update",
|
long_opts = ["help", "key=", "lvm=", "package=", "section=", "silent",
|
||||||
"verbose", "version=", "with-sbuild", 'pbuilder=', "with-piuparts"]
|
"update", "upload", "verbose", "version=", "with-sbuild",
|
||||||
opts, args = getopt.gnu_getopt(sys.argv[1:], "e:hk:p:PsSC:uvV:", long_opts)
|
"pbuilder=", "with-piuparts"]
|
||||||
|
opts, args = getopt.gnu_getopt(sys.argv[1:], "e:fhk:p:PsSC:uvV:", long_opts)
|
||||||
except getopt.GetoptError, e:
|
except getopt.GetoptError, e:
|
||||||
# will print something like "option -a not recognized"
|
# will print something like "option -a not recognized"
|
||||||
print >> sys.stderr, str(e)
|
print >> sys.stderr, str(e)
|
||||||
sys.exit(COMMAND_LINE_SYNTAX_ERROR)
|
sys.exit(COMMAND_LINE_SYNTAX_ERROR)
|
||||||
|
|
||||||
|
upload = False
|
||||||
package = None
|
package = None
|
||||||
sbuild = False
|
sbuild = False
|
||||||
section = None
|
section = None
|
||||||
@ -314,6 +330,8 @@ if __name__ == '__main__':
|
|||||||
pbuilder=a
|
pbuilder=a
|
||||||
elif o in ("-u", "--update"):
|
elif o in ("-u", "--update"):
|
||||||
update = True
|
update = True
|
||||||
|
elif o in ("-U", "--upload"):
|
||||||
|
upload = True
|
||||||
elif o in ("-v", "--verbose"):
|
elif o in ("-v", "--verbose"):
|
||||||
verbose = True
|
verbose = True
|
||||||
elif o in ("-V", "--version"):
|
elif o in ("-V", "--version"):
|
||||||
@ -336,4 +354,5 @@ if __name__ == '__main__':
|
|||||||
sys.exit(COMMAND_LINE_SYNTAX_ERROR)
|
sys.exit(COMMAND_LINE_SYNTAX_ERROR)
|
||||||
bug_numbers.append(number)
|
bug_numbers.append(number)
|
||||||
|
|
||||||
main(bug_numbers, package, version, section, update, uploader_email, key, verbose, silent)
|
main(bug_numbers, package, version, section, update, uploader_email, key,
|
||||||
|
upload, verbose, silent)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user