mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-16 01:21:07 +00:00
sponsor-patch: Fix crash if uploading to ubuntu without building the package before.
This commit is contained in:
parent
d264ee7e97
commit
0a35d3d13d
3
debian/changelog
vendored
3
debian/changelog
vendored
@ -27,8 +27,9 @@ ubuntu-dev-tools (0.109) UNRELEASED; urgency=low
|
|||||||
- Add new --lpinstance and --no-conf options.
|
- Add new --lpinstance and --no-conf options.
|
||||||
- Support configuration files.
|
- Support configuration files.
|
||||||
- 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.
|
||||||
|
|
||||||
-- Benjamin Drung <bdrung@ubuntu.com> Tue, 21 Dec 2010 22:47:20 +0100
|
-- Benjamin Drung <bdrung@ubuntu.com> Wed, 22 Dec 2010 00:51:48 +0100
|
||||||
|
|
||||||
ubuntu-dev-tools (0.108) experimental; urgency=low
|
ubuntu-dev-tools (0.108) experimental; urgency=low
|
||||||
|
|
||||||
|
@ -394,9 +394,13 @@ def main(bug_number, build, builder, edit, keyid, lpinstance, update, upload,
|
|||||||
ask_for_manual_fixing()
|
ask_for_manual_fixing()
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
build_log = None
|
||||||
if build:
|
if build:
|
||||||
dist = re.sub("-.*$", "", changelog.distributions)
|
dist = re.sub("-.*$", "", changelog.distributions)
|
||||||
buildresult = os.path.join(workdir, "buildresult")
|
buildresult = os.path.join(workdir, "buildresult")
|
||||||
|
build_name = task.package + "_" + strip_epoch(new_version) + \
|
||||||
|
"_" + builder.get_architecture() + ".build"
|
||||||
|
build_log = os.path.join(buildresult, build_name)
|
||||||
|
|
||||||
successful_built = False
|
successful_built = False
|
||||||
while not successful_built:
|
while not successful_built:
|
||||||
@ -429,34 +433,37 @@ def main(bug_number, build, builder, edit, keyid, lpinstance, update, upload,
|
|||||||
# We want to do a manual fix if the build failed.
|
# We want to do a manual fix if the build failed.
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Check lintian
|
# Determine whether to use the source or binary build for lintian
|
||||||
changes_name = task.package + "_" + strip_epoch(new_version) + \
|
if build_log:
|
||||||
|
build_changes = task.package + "_" + strip_epoch(new_version) + \
|
||||||
"_" + builder.get_architecture() + ".changes"
|
"_" + builder.get_architecture() + ".changes"
|
||||||
build_changes = os.path.join(buildresult, changes_name)
|
changes_for_lintian = os.path.join(buildresult, build_changes)
|
||||||
assert os.path.isfile(build_changes), "%s does not exist." % \
|
else:
|
||||||
(build_changes)
|
changes_for_lintian = changes_file
|
||||||
cmd = ["lintian", "-IE", "--pedantic", "-q", build_changes]
|
|
||||||
lintian_filename = os.path.join(workdir,
|
|
||||||
task.package + "_" + strip_epoch(new_version) + ".lintian")
|
|
||||||
Logger.command(cmd + [">", lintian_filename])
|
|
||||||
process = subprocess.Popen(cmd, stdout=subprocess.PIPE)
|
|
||||||
report = process.communicate()[0]
|
|
||||||
|
|
||||||
# write lintian report file
|
# Check lintian
|
||||||
lintian_file = open(lintian_filename, "w")
|
assert os.path.isfile(changes_for_lintian), "%s does not exist." % \
|
||||||
lintian_file.writelines(report)
|
(changes_for_lintian)
|
||||||
lintian_file.close()
|
cmd = ["lintian", "-IE", "--pedantic", "-q", changes_for_lintian]
|
||||||
|
lintian_filename = os.path.join(workdir,
|
||||||
|
task.package + "_" + strip_epoch(new_version) + ".lintian")
|
||||||
|
Logger.command(cmd + [">", lintian_filename])
|
||||||
|
process = subprocess.Popen(cmd, stdout=subprocess.PIPE)
|
||||||
|
report = process.communicate()[0]
|
||||||
|
|
||||||
|
# write lintian report file
|
||||||
|
lintian_file = open(lintian_filename, "w")
|
||||||
|
lintian_file.writelines(report)
|
||||||
|
lintian_file.close()
|
||||||
|
|
||||||
# Upload package
|
# Upload package
|
||||||
if upload:
|
if upload:
|
||||||
if upload == "ubuntu":
|
if upload == "ubuntu":
|
||||||
build_name = task.package + "_" + strip_epoch(new_version) + \
|
print "Please check %s %s carefully:\nfile://%s\nfile://%s" % \
|
||||||
"_" + builder.get_architecture() + ".build"
|
(task.package, new_version, debdiff_filename,
|
||||||
build_log = os.path.join(buildresult, build_name)
|
lintian_filename)
|
||||||
print "Please check %s %s carefully:\nfile://%s\nfile://%s\n" \
|
if build_log:
|
||||||
"file://%s" % (task.package, new_version,
|
print "\nfile://%s" % build_log
|
||||||
debdiff_filename, lintian_filename,
|
|
||||||
build_log)
|
|
||||||
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 " \
|
||||||
"the official Ubuntu archive", "yes")
|
"the official Ubuntu archive", "yes")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user