launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #02085
[Merge] lp:~mbp/launchpad/683486-build-mailman into lp:launchpad
Martin Pool has proposed merging lp:~mbp/launchpad/683486-build-mailman into lp:launchpad.
Requested reviews:
Barry Warsaw (barry)
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
#683486 spurious test failures regarding LPModerate and XMLRPCRunner
https://bugs.launchpad.net/bugs/683486
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.
--
https://code.launchpad.net/~mbp/launchpad/683486-build-mailman/+merge/42449
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~mbp/launchpad/683486-build-mailman into lp:launchpad.
=== 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 @@
#! /usr/bin/python
#
-# Copyright 2009 Canonical Ltd. This software is licensed under the
+# Copyright 2009, 2010 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
import os
@@ -36,6 +36,11 @@
sys.path.append(mailman_path)
try:
import Mailman
+ # Also check for Launchpad-specific bits stuck into the source tree by
+ # monkey_patch(), in case this is half-installed. See
+ # <https://bugs.launchpad.net/launchpad-registry/+bug/683486>.
+ from Mailman.Queue import XMLRPCRunner
+ from Mailman.Handlers import LPModerate
except ImportError:
pass
else: