SPECS: python.spec - non-python *.py in /usr/bin were crashing som...

wrobell wrobell at pld-linux.org
Wed Feb 16 13:49:49 CET 2005


On Wed, Feb 16, 2005 at 01:25:57PM +0100, michal salaban wrote:
> on Wed, Feb 16, 2005 at 11:01:12AM +0100, wrobell wrote:
> 
> > > Author: emes                         Date: Wed Feb 16 08:43:58 2005 GMT
> > > Module: SPECS                         Tag: HEAD
> > > ---- Log message:
> > > - non-python *.py in /usr/bin were crashing some apps (e.g. twistd)
> > Please revert this change and:
> > - what is the exact error?
> > - how can I reproduce it?
> 
> you can reproduce it by installing python-Twisted and running twistd.
> 
> let's take /usr/bin/pdb.py under consideration.
> although it has .py extension, it's not a python code, but a shell script.
> 
> twistd is located in /usr/bin. it contains 'import pdb' directive.
> import takes script located in the same directory (/usr/bin/pdb.py mentioned
> above) instead of /usr/share/python2.4/[...]/pdb.py. of course, fails on
> syntax error because it's not a python script.
twistd should remove /usr/bin from its sys.path

> the other, better solution is to copy or link original python scripts to
> /usr/bin. i'm currently working on it.
if you run a script as root and then python will not try to create *.py[co]
file in /usr/bin... but then twistd will import pdb from /usr/bin?

    wrobell <wrobell at pld-linux.org>




More information about the pld-devel-en mailing list