From 85c1a202d25726af703594f4deb56d162181fc1f Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Fri, 5 Oct 2007 11:36:28 +0200 Subject: [PATCH 1/3] * Added support for Bugs/Debian/Usertagging in submittodebian. * setup.py: actually install submittodebian. --- debian/changelog | 10 ++++++++++ debian/control | 2 +- setup.py | 3 ++- submittodebian | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 127958b..d1fcaf3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +ubuntu-dev-tools (0.16) gutsy; urgency=low + + [ Lucas Nussbaum ] + * Added support for Bugs/Debian/Usertagging in submittodebian. + + [ Daniel Holbach ] + * setup.py: actually install submittodebian. + + -- Daniel Holbach Fri, 05 Oct 2007 11:05:29 +0200 + ubuntu-dev-tools (0.15) gutsy; urgency=low [ Laurent Bigonville ] diff --git a/debian/control b/debian/control index 3097a6a..dff076c 100644 --- a/debian/control +++ b/debian/control @@ -12,7 +12,7 @@ Standards-Version: 3.7.2 Package: ubuntu-dev-tools Architecture: all Section: devel -Depends: ${python:Depends}, ${misc:Depends}, binutils, devscripts, sudo, python-launchpad-bugs (>= 0.2.14) +Depends: ${python:Depends}, ${misc:Depends}, binutils, devscripts, sudo, python-launchpad-bugs (>= 0.2.14), reportbug (>= 3.38ubuntu3) Recommends: bzr, pbuilder Conflicts: devscripts (<< 2.10.7ubuntu5) Replaces: devscripts (<< 2.10.7ubuntu5) diff --git a/setup.py b/setup.py index a19154b..19c35d7 100755 --- a/setup.py +++ b/setup.py @@ -28,7 +28,8 @@ setup(name='ubuntu-dev-tools', 'ppaput', 'requestsync', 'hugdaylist', - 'massfile' + 'massfile', + 'submittodebian' ], ) diff --git a/submittodebian b/submittodebian index b29b1fd..3e65f7f 100755 --- a/submittodebian +++ b/submittodebian @@ -64,7 +64,7 @@ def edit_debdiff(debdiff): run_cmd(cmd) def submit_bugreport(body, debdiff, changelog): - cmd = 'reportbug -A %s -B debian -i %s -V %s %s' % (debdiff, body, deb_version, changelog.package) + cmd = 'reportbug -P "User: ubuntu-devel@lists.ubuntu.com" -P "Usertags: origin-ubuntu hardy ubuntu-patch" -A %s -B debian -i %s -V %s %s' % (debdiff, body, deb_version, changelog.package) run_cmd(cmd) def run_cmd(cmd): From 727de192481ab9835dbaaeb3d346aa2501e7bfe5 Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Fri, 5 Oct 2007 11:46:58 +0200 Subject: [PATCH 2/3] * submittodebian: backed out changes from last upload. This needs Debian Bug 445144 fixed. * debian/control: don't Depends on a version of reportbug Ubuntu does not have yet. --- debian/changelog | 9 +++++++++ debian/control | 2 +- submittodebian | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index d1fcaf3..bf32f2d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +ubuntu-dev-tools (0.17) gutsy; urgency=low + + * submittodebian: backed out changes from last upload. This needs Debian Bug + 445144 fixed. + * debian/control: don't Depends on a version of reportbug Ubuntu does not + have yet. + + -- Daniel Holbach Fri, 05 Oct 2007 11:44:51 +0200 + ubuntu-dev-tools (0.16) gutsy; urgency=low [ Lucas Nussbaum ] diff --git a/debian/control b/debian/control index dff076c..77d70c6 100644 --- a/debian/control +++ b/debian/control @@ -12,7 +12,7 @@ Standards-Version: 3.7.2 Package: ubuntu-dev-tools Architecture: all Section: devel -Depends: ${python:Depends}, ${misc:Depends}, binutils, devscripts, sudo, python-launchpad-bugs (>= 0.2.14), reportbug (>= 3.38ubuntu3) +Depends: ${python:Depends}, ${misc:Depends}, binutils, devscripts, sudo, python-launchpad-bugs (>= 0.2.14), reportbug Recommends: bzr, pbuilder Conflicts: devscripts (<< 2.10.7ubuntu5) Replaces: devscripts (<< 2.10.7ubuntu5) diff --git a/submittodebian b/submittodebian index 3e65f7f..b29b1fd 100755 --- a/submittodebian +++ b/submittodebian @@ -64,7 +64,7 @@ def edit_debdiff(debdiff): run_cmd(cmd) def submit_bugreport(body, debdiff, changelog): - cmd = 'reportbug -P "User: ubuntu-devel@lists.ubuntu.com" -P "Usertags: origin-ubuntu hardy ubuntu-patch" -A %s -B debian -i %s -V %s %s' % (debdiff, body, deb_version, changelog.package) + cmd = 'reportbug -A %s -B debian -i %s -V %s %s' % (debdiff, body, deb_version, changelog.package) run_cmd(cmd) def run_cmd(cmd): From ba8541352a6125cb36d3cd0250475c62ab5fdc3d Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Fri, 5 Oct 2007 14:20:22 +0200 Subject: [PATCH 3/3] * requestsync: add an option to "Add latest debian version to the title of the bug" (LP: #132221) --- debian/changelog | 7 +++++++ requestsync | 31 +++++++++++++++++++++++++------ 2 files changed, 32 insertions(+), 6 deletions(-) diff --git a/debian/changelog b/debian/changelog index bf32f2d..4d23d95 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +ubuntu-dev-tools (0.18) gutsy; urgency=low + + * requestsync: add an option to "Add latest debian version to the title of + the bug" (LP: #132221) + + -- Marco Rodrigues Fri, 05 Oct 2007 14:16:34 +0200 + ubuntu-dev-tools (0.17) gutsy; urgency=low * submittodebian: backed out changes from last upload. This needs Debian Bug diff --git a/requestsync b/requestsync index 9bf7ea7..3cbde46 100755 --- a/requestsync +++ b/requestsync @@ -27,6 +27,24 @@ def cur_version_component(sourcepkg, release): print "%s doesn't appear to exist in %s, specify -n for a package not in Ubuntu." % (sourcepkg, release) sys.exit(1) +def cur_deb_version(sourcepkg): + ''' Return the current debian version of a package in unstable ''' + madison = subprocess.Popen(['rmadison', '-u', 'debian', '-a', 'source', \ + '-s', 'unstable', sourcepkg], \ + stdout=subprocess.PIPE) + out = madison.communicate()[0] + assert (madison.returncode == 0) + + try: + assert out + except AssertionError: + print "%s doesn't appear to exist in Debian." % sourcepkg + sys.exit(1) + + return out.split('|')[1].rstrip('[]''').lstrip() + + sys.exit(1) + def debian_changelog(sourcepkg, component, version): '''Return the Debian changelog from the latest up to the given version (exclusive).''' @@ -54,7 +72,7 @@ def debian_component(sourcepkg): except AssertionError: print "%s doesn't appear to exist in Debian." % sourcepkg sys.exit(1) - raw_comp = out.split(' | ')[2].split('/') + raw_comp = out.split('|')[2].split('/') component = 'main' if len(raw_comp) == 2: component = raw_comp[1] @@ -65,7 +83,7 @@ def usage(): In some cases, the base version (fork point from Debian) cannot be determined automatically, and you'll get a complete Debian changelog. Specify the correct -base version in that case.""" +base version of the package in Ubuntu.""" sys.exit(1) # @@ -103,6 +121,7 @@ debiancomponent = debian_component(srcpkg) # generate bug report status = "confirmed" subscribe = "ubuntu-archive" +deb_version = cur_deb_version(srcpkg) if sponsorship: status = "new" if component in ['main', 'restricted']: @@ -118,8 +137,8 @@ report = ''' affects ubuntu%s status %s subscribe %s -Please sync %s (%s) from Debian unstable (%s). -''' % (affects, status, subscribe, srcpkg, component, debiancomponent) +Please sync %s %s (%s) from Debian unstable (%s). +''' % (affects, status, subscribe, srcpkg, deb_version, component, debiancomponent) base_ver = cur_ver uidx = base_ver.find('ubuntu') @@ -166,9 +185,9 @@ to = 'new@bugs.launchpad.net' mail = '''From: %s To: %s -Subject: Please sync %s (%s) from Debian unstable (%s) +Subject: Please sync %s %s (%s) from Debian unstable (%s) -%s''' % (myemailaddr, to, srcpkg, component, debiancomponent, signed_report) +%s''' % (myemailaddr, to, srcpkg, deb_version, component, debiancomponent, signed_report) print mail