1 |
I'm on the list, obviously, so PLEASE stop Cc-ing me! |
2 |
|
3 |
On 30-09-2012 15:57:16 +0200, Michał Górny wrote: |
4 |
> > The files are indeed cache, and should be generated on the system that |
5 |
> > installs the files, not the system that builds them. They are currently |
6 |
> > outside of VDB. pyc files store the path to the original files, so |
7 |
> > generating in ${ROOT} yields in wrong paths. Python sometimes |
8 |
> > regenerates the files when it runs. It may as well just ignore them |
9 |
> > (since they are newer but non-matching, unclear to me). In the worst |
10 |
> > case it returns "Bad marshalling data". |
11 |
> |
12 |
> I'm afraid you are wrong here. |
13 |
> |
14 |
> I've just tested an ebuild using distutils (flaggie) and autotools |
15 |
> (pygobject) and both install .pyc files with correct paths (i.e. with |
16 |
> DESTDIR stripped). |
17 |
|
18 |
Could be, if it uses relative paths, but they won't be absolute then |
19 |
either. From some experiments I did, I saw Python ignoring wrong paths |
20 |
(entire cache?), or updating the pyc/pyo files. Regardless whether or |
21 |
not the data is wrong, the discussion is more if it hurts (and makes |
22 |
sense). |
23 |
|
24 |
Back then, we found it hurt us (Bad marshalling data) when using |
25 |
binpkgs. Not sure if it still does today with Python 2.7. Somehow we |
26 |
reached a consensus with the Python maintainer at that time that cache |
27 |
stuff shouldn't be in VDB, also because it depends on system and perhaps |
28 |
Python version. Since embedded systems might not even want it (it's |
29 |
just cache afterall, wasting their sometimes precious disk space), it |
30 |
had to be out of the package contents for them as well. |
31 |
|
32 |
That's how we came to the situation as it was before python eclass |
33 |
rewrites. I'd much prefer Python to write its cache to some |
34 |
/var/cache/python dir so it can create whatever it wants, but on a |
35 |
place which is not of any concern, as its obvious one can throw it away, |
36 |
and doesn't pollute the live fs. But Python doesn't work that way. |
37 |
|
38 |
Whatever the new way will be, for whatever reason, please make sure it |
39 |
is consistent. And be aware that this doesn't just mean changing |
40 |
eclasses, since this rule is effectuated in certain ebuilds too |
41 |
(dev-lang/python itself being the most obvious example). |
42 |
|
43 |
|
44 |
-- |
45 |
Fabian Groffen |
46 |
Gentoo on a different level |