1 |
On Fri, 2007-12-07 at 18:11 +0100, Fabian Groffen wrote: |
2 |
|
3 |
> > Traceback (most recent call last): |
4 |
> > File "/eprefix/usr/lib/portage/bin/portageq", line 467, in ? |
5 |
> > main() |
6 |
> > File "/eprefix/usr/lib/portage/bin/portageq", line 450, in main |
7 |
> > except portage.exception.PermissionDenied, e: |
8 |
> > AttributeError: 'module' object has no attribute 'exception' |
9 |
|
10 |
> > IMO having portage-provided "executables" (like emerge (does it?), |
11 |
> > portageq, ...) relying on PYTHONPATH to "import portage" correctly |
12 |
> is a |
13 |
> > pain - not only in prefix: think of calling /usr/bin/portageq (the |
14 |
> > "native" one) while prefix' PYTHONPATH is set up in environment... |
15 |
> |
16 |
> Hmmm... this needs some thinking. I believe the portage code was/is |
17 |
> already set up in such a way that it could do without a patched python |
18 |
> to have portage's paths in PYTHONPATH. |
19 |
|
20 |
Yes, but first it tries to find *portage* module(s) using default python |
21 |
mechanism, which is PYTHONPATH first, then python builtin path. |
22 |
|
23 |
> |
24 |
> However, portage /does/ record which python it wants to use, so |
25 |
> eventually it gets the "correct" python libraries when NOT using |
26 |
> PYTHONPATH. |
27 |
|
28 |
Problem here is not that it finds wrong python modules, but wrong |
29 |
*portage* modules, because PYTHONPATH=/usr/lib/portage/pym |
30 |
|
31 |
It (seems to) work when I unset PYTHONPATH before doing prefix. |
32 |
|
33 |
/haubi/ |
34 |
-- |
35 |
Michael Haubenwallner |
36 |
Gentoo on a different level |
37 |
|
38 |
-- |
39 |
gentoo-alt@g.o mailing list |