Merge lp:~maxb/launchpad/bug-497731 into lp:launchpad
Proposed by
Max Bowsher
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | not available | ||||
Proposed branch: | lp:~maxb/launchpad/bug-497731 | ||||
Merge into: | lp:launchpad | ||||
Diff against target: |
151 lines (+26/-40) 4 files modified
lib/lp/codehosting/__init__.py (+16/-4) lib/lp/codehosting/sshserver/tests/test_session.py (+2/-2) lib/lp/codehosting/tests/test_acceptance.py (+5/-3) lib/lp/codehosting/tests/test_lpserve.py (+3/-31) |
||||
To merge this branch: | bzr merge lp:~maxb/launchpad/bug-497731 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Guilherme Salgado (community) | code | Approve | |
Review via email: mp+19732@code.launchpad.net |
Commit message
Keep the Python dist-packages directory off the bzr plugin path, thus fixing testsuite failures when incompatible bzr plugins are installed there.
To post a comment you must log in.
I observed some test failures which turned out to be because of unclean stderr, when a Launchpad bzr subprocess tried to load plugins from my /usr/lib/ python2. 5/dist- packages/ bzrlib/ plugins/ directory, when those plugins required bzr 2.0 (my system bzrlib) but Launchpad's bzrlib is an incompatible eggified 2.1.
The root of the problem is that bzr shouldn't be trying to load plugins from /usr/lib/ python2. 5/dist- packages/ bzrlib/ plugins/ at all, in a Launchpad scenario. Happily, bzr 2.1 adds extra syntax to BZR_PLUGIN_PATH which allows us to tell it not to: we need to add "-site" as a component of BZR_PLUGIN_PATH.
So, here's a simple patch to do just that. In doing so, we get to clean up a big block of code which *tried* (but failed because its regexps were not quite right) to tolerate these warnings in stderr.
To QA this without running the entire testsuite, you should run bin/test -t lp.codehosting. tests.test_ lpserve.
NB: You need to have some .deb-packaged plugins which are not compatible with bzrlib 2.1 installed to manifest the actual test failures.