Fix: The package was only uploaded if the target was "ubuntu".

This commit is contained in:
Benjamin Drung 2010-12-22 14:19:21 +01:00
parent 9077c0babd
commit 715c554e88
2 changed files with 38 additions and 32 deletions

3
debian/changelog vendored
View File

@ -29,8 +29,9 @@ ubuntu-dev-tools (0.109) UNRELEASED; urgency=low
- Default to a temporary workdir and clean it up (LP: #691467). - Default to a temporary workdir and clean it up (LP: #691467).
- Fix 'str' object has no attribute 'startwith' crash caused by a typo. - Fix 'str' object has no attribute 'startwith' crash caused by a typo.
- Fix crash if uploading to ubuntu without building the package before. - Fix crash if uploading to ubuntu without building the package before.
- Fix: The package was only uploaded if the target was "ubuntu".
-- Benjamin Drung <bdrung@ubuntu.com> Wed, 22 Dec 2010 12:52:56 +0100 -- Benjamin Drung <bdrung@ubuntu.com> Wed, 22 Dec 2010 13:38:36 +0100
ubuntu-dev-tools (0.108) experimental; urgency=low ubuntu-dev-tools (0.108) experimental; urgency=low

View File

@ -458,15 +458,18 @@ def main(bug_number, build, builder, edit, keyid, lpinstance, update, upload,
# Upload package # Upload package
if upload: if upload:
if upload == "ubuntu":
print "Please check %s %s carefully:\nfile://%s\nfile://%s" % \ print "Please check %s %s carefully:\nfile://%s\nfile://%s" % \
(task.package, new_version, debdiff_filename, (task.package, new_version, debdiff_filename,
lintian_filename) lintian_filename)
if build_log: if build_log:
print "\nfile://%s" % build_log print "\nfile://%s" % build_log
if upload == "ubuntu":
target = "the official Ubuntu archive"
else:
target = upload
question = Question(["yes", "edit", "no"]) question = Question(["yes", "edit", "no"])
answer = question.ask("Do you want to upload the package to " \ answer = question.ask("Do you want to upload the package to %s" % \
"the official Ubuntu archive", "yes") target, "yes")
if answer == "edit": if answer == "edit":
continue continue
elif answer == "no": elif answer == "no":
@ -477,7 +480,9 @@ def main(bug_number, build, builder, edit, keyid, lpinstance, update, upload,
Logger.error("Upload of %s to %s failed." % \ Logger.error("Upload of %s to %s failed." % \
(os.path.basename(changes_file), upload)) (os.path.basename(changes_file), upload))
sys.exit(1) sys.exit(1)
if branch:
# Push the branch if the package is uploaded to the Ubuntu archive.
if upload == "ubuntu" and branch:
cmd = ['debcommit'] cmd = ['debcommit']
Logger.command(cmd) Logger.command(cmd)
if subprocess.call(cmd) != 0: if subprocess.call(cmd) != 0: