[arch-dev-public] Strange behaviour of pacman

Allan McRae allan at archlinux.org
Mon Oct 19 19:48:58 EDT 2009


Jan de Groot wrote:
> On Mon, 2009-10-19 at 15:18 -0500, Aaron Griffin wrote:
>   
>> Are you saying that the .pyo files are no longer architecture
>> independent? I was under the assumption they were.
>>     
>
> Actually, they're even python-version specific. Updating python could
> break the precompiled .pyo files. 
>   

And this whole issue was a fairly major source of headaches during the 
python-2.6 transition...  which is why I started making the python 
packaging policy to deal with them, although that obviously was never 
finished with  (in fact, I had never seen the comment with --optimize=1 
in it).

Now my main concern about all of this is that .pyc and .pyo files used 
to contain full paths to where they were created.  That meant they need 
to be created on the users system and not during the packaging stage.   
I have not confirmed if this is still the case.

So the best way to deal with them seems to be:
1) touch them during packaging
2) generate them during post_install()

Allan



More information about the arch-dev-public mailing list