Merge lp:~maxb/lpreview-body/fix-package into lp:~launchpad-committers/lpreview-body/packaging

Proposed by Max Bowsher
Status: Merged
Approved by: Gavin Panella
Approved revision: 23
Merged at revision: 23
Proposed branch: lp:~maxb/lpreview-body/fix-package
Merge into: lp:~launchpad-committers/lpreview-body/packaging
Diff against target: 108 lines (+39/-17)
4 files modified
__init__.py (+27/-16)
debian/changelog (+10/-0)
debian/control (+1/-0)
qa_ready.py (+1/-1)
To merge this branch: bzr merge lp:~maxb/lpreview-body/fix-package
Reviewer Review Type Date Requested Status
Gavin Panella (community) Approve
Review via email: mp+59137@code.launchpad.net

Commit message

[r=allenap][bug=766149] New upstream snapshot (Use lazy hook installation with bzr >= 2.4; Correct regexp used for getting revno currently on edge); Add missing XB-Python-Version field to control, fixing incorrect installation path of the Python files.

Description of the change

Fix the package, which is currently totally broken due to installing the Python files in the incorrect directory.

Then, pull in a couple of upstream changes whilst we're rebuilding it anyway.

To post a comment you must log in.
Revision history for this message
Gavin Panella (allenap) wrote :

I know almost nothing about the dirty work involved in packaging, but
a search led me to the following:

  The use of XB-Python-Version in the binary package paragraphs of
  debian/control file has been deprecated and should be removed in the
  normal course of package updates. It never achieved sufficient
  deployment to support it's intended purpose of managing Python
  transitions. This can be adequately accomplished by examining
  package dependencies.

  http://www.debian.org/doc/packaging-manuals/python-policy/ch-module_packages.html

Should you instead be using X-Python-Version?

review: Needs Information
Revision history for this message
Max Bowsher (maxb) wrote :

> The use of XB-Python-Version in the binary package paragraphs of
> debian/control file has been deprecated
...
> Should you instead be using X-Python-Version?

If we were targetting Debian sid or Ubuntu natty, then yes. However this packaging is specifically using forms that are now considered deprecated in order to target Ubuntu >= lucid.

Revision history for this message
Gavin Panella (allenap) wrote :

Thanks for the explanation.

review: Approve
Revision history for this message
Gavin Panella (allenap) wrote :

Do you need someone to land this for you?

Revision history for this message
Max Bowsher (maxb) wrote :

> Do you need someone to land this for you?

Currently yes, though Robert implied I could be given write access to the branch in bug 766149.

Revision history for this message
Gavin Panella (allenap) wrote :

Okay, set a commit message and I'll send it off.

Revision history for this message
Gavin Panella (allenap) wrote :

Max, I had to squish the commit message because PQM, bless its cotton socks, can't deal with more than a single line at a time.

Revision history for this message
Max Bowsher (maxb) wrote :

PQM hasn't been used on this branch before, and I now have commit access. Can you see any reason why I shouldn't just push these revisions at the branch directly?

Revision history for this message
Gavin Panella (allenap) wrote :

No, just land it then. Sorry for the bother!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file '__init__.py'
--- __init__.py 2010-08-04 10:58:33 +0000
+++ __init__.py 2011-04-26 22:01:28 +0000
@@ -16,8 +16,7 @@
1616
17"""Provide review message bodies for proposed merges to Launchpad itself."""17"""Provide review message bodies for proposed merges to Launchpad itself."""
1818
19from bzrlib import commands, merge_directive19from bzrlib import commands
20
2120
22def shim(params):21def shim(params):
23 from body_callback import body_callback22 from body_callback import body_callback
@@ -31,25 +30,37 @@
31 hook_params['old_body'])30 hook_params['old_body'])
3231
3332
34if getattr(merge_directive.MergeDirective, 'hooks', None) is not None:
35 merge_directive.MergeDirective.hooks.install_named_hook(
36 'merge_request_body',
37 shim, 'Generate a message body for Launchpad merge requests.'
38 )
39try:33try:
40 from bzrlib.plugins.launchpad import lp_propose34 from bzrlib.hooks import install_lazy_named_hook
41except ImportError:35except ImportError: # bzr < 2.4
42 pass36 from bzrlib import merge_directive
37 if getattr(merge_directive.MergeDirective, 'hooks', None) is not None:
38 merge_directive.MergeDirective.hooks.install_named_hook(
39 'merge_request_body',
40 shim, 'Generate a message body for Launchpad merge requests.'
41 )
42 try:
43 from bzrlib.plugins.launchpad import lp_propose
44 except ImportError:
45 pass
46 else:
47 lp_propose.Proposer.hooks.install_named_hook(
48 'merge_proposal_body',
49 proposer_callback,
50 'Generate a message body for Launchpad merge requests.'
51 )
43else:52else:
44 lp_propose.Proposer.hooks.install_named_hook(53 install_lazy_named_hook(
45 'merge_proposal_body',54 "bzrlib.merge_directive", "MergeDirective.hooks",
46 proposer_callback,55 'merge_request_body',
47 'Generate a message body for Launchpad merge requests.'56 shim, 'Generate a message body for Launchpad merge requests.')
48 )57 install_lazy_named_hook(
58 "bzrlib.plugins.launcjpad.lp_propose", "Proposer.hooks",
59 'merge_proposal_body', proposer_callback,
60 'Generate a message body for Launchpad merge requests.')
4961
5062
51commands.plugin_cmds.register_lazy(63commands.plugin_cmds.register_lazy(
52 'cmd_qa_ready', [], 'bzrlib.plugins.lpreview_body.qa_ready')64 'cmd_qa_ready', [], 'bzrlib.plugins.lpreview_body.qa_ready')
53
54commands.plugin_cmds.register_lazy(65commands.plugin_cmds.register_lazy(
55 'cmd_lp_link_bug', [], 'bzrlib.plugins.lpreview_body.link_bug')66 'cmd_lp_link_bug', [], 'bzrlib.plugins.lpreview_body.link_bug')
5667
=== modified file 'debian/changelog'
--- debian/changelog 2010-08-05 09:06:04 +0000
+++ debian/changelog 2011-04-26 22:01:28 +0000
@@ -1,3 +1,13 @@
1bzr-lpreview-body (0.1~bzr22-0launchpad1) lucid; urgency=low
2
3 * Add missing XB-Python-Version field to control, fixing incorrect
4 installation path of the Python files. (LP: #766149)
5 * New upstream snapshot:
6 - Use lazy hook installation with bzr >= 2.4.
7 - Correct regexp used for getting revno currently on edge.
8
9 -- Max Bowsher <maxb@f2s.com> Tue, 26 Apr 2011 22:53:48 +0100
10
1bzr-lpreview-body (0.1~bzr20-0ubuntu1~launchpad1) lucid; urgency=low11bzr-lpreview-body (0.1~bzr20-0ubuntu1~launchpad1) lucid; urgency=low
212
3 * Initial release.13 * Initial release.
414
=== modified file 'debian/control'
--- debian/control 2010-08-04 11:03:39 +0000
+++ debian/control 2011-04-26 22:01:28 +0000
@@ -10,6 +10,7 @@
10Package: bzr-lpreview-body10Package: bzr-lpreview-body
11Architecture: all11Architecture: all
12Depends: bzr, ${misc:Depends}12Depends: bzr, ${misc:Depends}
13XB-Python-Version: ${python:Versions}
13Description: Bazaar plugin to provide review message bodies for Launchpad14Description: Bazaar plugin to provide review message bodies for Launchpad
14 This Bazaar plugin generates a standard template for the message body, with15 This Bazaar plugin generates a standard template for the message body, with
15 lint output at the bottom.16 lint output at the bottom.
1617
=== modified file 'qa_ready.py'
--- qa_ready.py 2010-04-21 22:53:07 +0000
+++ qa_ready.py 2011-04-26 22:01:28 +0000
@@ -32,7 +32,7 @@
32 """32 """
33 t = get_transport('https://edge.launchpad.net/')33 t = get_transport('https://edge.launchpad.net/')
34 html = t.get_bytes('index.html')34 html = t.get_bytes('index.html')
35 revision_re = re.compile(r'\(r(\d+)\)')35 revision_re = re.compile(r' +r(\d+)')
36 for line in html.splitlines():36 for line in html.splitlines():
37 matches = revision_re.search(line)37 matches = revision_re.search(line)
38 if matches:38 if matches:

Subscribers

People subscribed via source and target branches

to all changes: