Merge lp:~mbp/launchpad/683486-build-mailman into lp:launchpad

Proposed by Martin Pool
Status: Merged
Approved by: Gavin Panella
Approved revision: no longer in the source branch.
Merged at revision: 12118
Proposed branch: lp:~mbp/launchpad/683486-build-mailman
Merge into: lp:launchpad
Diff against target: 23 lines (+6/-1)
1 file modified
buildmailman.py (+6/-1)
To merge this branch: bzr merge lp:~mbp/launchpad/683486-build-mailman
Reviewer Review Type Date Requested Status
Barry Warsaw (community) Approve
Gavin Panella (community) Approve
Review via email: mp+42449@code.launchpad.net

Commit message

[r=allenap,barry][ui=none][bug=683486][no-qa] Ensure that Launchpad has fully patched the Mailman source tree when building.

Description of the change

This fixes bug 683486, described in thread <https://lists.launchpad.net/launchpad-dev/msg05846.html> where some tests fail with "cannot import LPModerate".

The background is that Launchpad has what it calls "monkeypatch" for Mailman, which
modifies the Mailman source tree. It seems that sometimes, I don't know how, Launchpad ends up with this tree actually unmodified but not detected as such, which causes the failures described above.

The usual tricks of update-sourcecode, make clean, make, even bzr clean-tree don't fix it.

This basically makes buildmailman a bit rebuild it if the monkeypatched-in modules aren't present.

This patch isn't totally satisfying because it duplicates knowledge about just how mailman is modified during the build, which is itself a bit of a kludge. However I think it does make things more correct, narrowly considered.

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

Thanks for the quick review. Would you mind landing this for me?

--
Martin

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

Sure.

Revision history for this message
Barry Warsaw (barry) wrote :

Sorry, I'm just now seeing this mp. I don't know why the normal build process isn't completing the monkeypatching, and it's been a long while since I looked at the Launchpad build process, but one thing you can (or maybe *could*) do was 'make SHHH= ' to see verbose output. I'm betting that in some circumstances, a failure earlier up will be visible and that should help explain why the monkey patching doesn't happen.

In any case, this extra backup of a test should be fine. Thanks for looking into this Martin.

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

Gah, I tried to land it twice on Friday but got kicked out by testfix. I think devel is closed now until after the release. I've added a reminder to land it on Thursday.

Revision history for this message
Martin Pool (mbp) wrote :

@Gavin, can you try again, please?

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'buildmailman.py'
--- buildmailman.py 2010-09-17 20:46:58 +0000
+++ buildmailman.py 2010-12-02 05:46:50 +0000
@@ -1,6 +1,6 @@
1#! /usr/bin/python1#! /usr/bin/python
2#2#
3# Copyright 2009 Canonical Ltd. This software is licensed under the3# Copyright 2009, 2010 Canonical Ltd. This software is licensed under the
4# GNU Affero General Public License version 3 (see the file LICENSE).4# GNU Affero General Public License version 3 (see the file LICENSE).
55
6import os6import os
@@ -36,6 +36,11 @@
36 sys.path.append(mailman_path)36 sys.path.append(mailman_path)
37 try:37 try:
38 import Mailman38 import Mailman
39 # Also check for Launchpad-specific bits stuck into the source tree by
40 # monkey_patch(), in case this is half-installed. See
41 # <https://bugs.launchpad.net/launchpad-registry/+bug/683486>.
42 from Mailman.Queue import XMLRPCRunner
43 from Mailman.Handlers import LPModerate
39 except ImportError:44 except ImportError:
40 pass45 pass
41 else:46 else: