mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-12 15:41:09 +00:00
submittodebian: Revert Ubuntu Maintainer mangling, and re-build the source
package before diffing. (LP: #902233)
This commit is contained in:
parent
d692d7b79b
commit
055dce8f40
2
debian/changelog
vendored
2
debian/changelog
vendored
@ -20,6 +20,8 @@ ubuntu-dev-tools (0.142) UNRELEASED; urgency=low
|
||||
(LP: #888736)
|
||||
* backportpackage: Allow unsigned backports (LP: #992739)
|
||||
* update-maintainer: Add a function to restore the original maintainer.
|
||||
* submittodebian: Revert Ubuntu Maintainer mangling, and re-build the source
|
||||
package before diffing. (LP: #902233)
|
||||
|
||||
-- Stefano Rivera <stefanor@debian.org> Wed, 25 Apr 2012 17:38:58 +0200
|
||||
|
||||
|
@ -34,6 +34,7 @@ from distro_info import UbuntuDistroInfo, DistroDataOutdated
|
||||
from ubuntutools.config import ubu_email
|
||||
from ubuntutools.question import YesNoQuestion, EditFile
|
||||
from ubuntutools.subprocess import call, check_call, Popen, PIPE
|
||||
from ubuntutools.update_maintainer import update_maintainer, restore_maintainer
|
||||
|
||||
try:
|
||||
from debian.changelog import Changelog
|
||||
@ -70,6 +71,13 @@ Thanks for considering the patch.
|
||||
""" % ("\n".join([a for a in entry.changes()]))
|
||||
return msg
|
||||
|
||||
def build_source_package():
|
||||
if os.path.isdir('.bzr'):
|
||||
cmd = ['bzr', 'bd', '-S', '--', '-uc', '-us', '-nc']
|
||||
else:
|
||||
cmd = ['debuild', '-S', '-uc', '-us', '-nc']
|
||||
check_call(cmd)
|
||||
|
||||
def gen_debdiff(tmpdir, changelog):
|
||||
pkg = changelog.package
|
||||
|
||||
@ -213,8 +221,16 @@ def main():
|
||||
fp.write(bug_body)
|
||||
fp.close()
|
||||
|
||||
restore_maintainer('debian')
|
||||
build_source_package()
|
||||
update_maintainer('debian')
|
||||
|
||||
debdiff = gen_debdiff(tmpdir, changelog)
|
||||
|
||||
# Build again as the user probably doesn't expect the Maintainer to be
|
||||
# reverted in the most recent build
|
||||
build_source_package()
|
||||
|
||||
EditFile(debdiff, 'debdiff').edit(optional=True)
|
||||
|
||||
submit_bugreport(body, debdiff, deb_version, changelog)
|
||||
|
Loading…
x
Reference in New Issue
Block a user