[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#230704: zope-testcase: SOFTWARE_HOME and INSTANCE_HOME can break install.



I'm Cc'ing this to debian-python because it has stuff that can impact on
other python packages.

On Tue, 2004-02-03 at 06:20, Andreas Tille wrote:
> On Tue, 3 Feb 2004, Donovan Baarda wrote:
> 
> > Yeah, if the postinst simply "unset" them both before running at least
> > "$PYTHON runalltests.py" it should work. It is probably wiser to unset them
> > at the beginning of postinst because there is a distant possiblity that they
> > could interfere with the Python compilation too. I'm not at the machine
> > where I hit this problem right now so it's not easy to test, but I'm 99%
> > sure it will work :-)
> Well, would you be able to test this in a reasonable time frame?
> If not I'll do an upload with "unset ..." tomorrow.

I just tested it, and found there was another problem with a set PYTHON
path. By adding the following to the top of the postinst, I got
"zope-testcase.postinst configure" to run properly with my development
environment in place;

unset PYTHONPATH
unset SOFTWARE_HOME
unset INSTANCE_HOME
unset http_proxy
 
I have a feeling PYTHONPATH should be unset in all python postinst and
maybe prerm scripts (something to add to the python policy?). A manually
set PYTHONPATH can do evil things to any python package's postinst and
prerm. 

In my case I had PYTHON path set to /usr/local/lib/python2.3/site
packages (I override and replace some python packages in my development
environment), so the postinst was pulling in some python2.3 packages
even though it was explicitly running python2.2. It's a wonder many
other python packages didn't bust on installation...

Unsetting of SOFTWARE_HOME and INSTANCE_HOME should probably also be
standard policy for all Zope packages for the same reason.

Unsetting of http_proxy is only there to bypass a bug in urllib that
impacts on ZopeTestCase (honours http_proxy, but ignores no_proxy).

> > No worries... actually you could put a workaround for the http_proxy problem
> > in postinst too by unsetting http_proxy before running the tests. However,
> > it's probably worth noting this somewhere in the Debian README as a gotcha
> > for people using ZopeTestCase, because they can hit it when running their
> > own tests.
> Thanks for the hints

No worries.

-- 
Donovan Baarda <abo@minkirri.apana.org.au>
http://minkirri.apana.org.au/~abo/



Reply to: