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

Re: [pkg-fso-maint] Bug#547510: zhone refuse to start



* Joey Hess <joeyh@debian.org>, 2009-09-23, 14:49:
it seems that this is actually a bug in dh: It seems to call setup.py
twice, once for each version of python, including adjusting the shebang
line. Then, as the the python version tried last ist 2.4, this modified
script is shipped with the package.

I’m not sure what to do differently, thus I’m CC’ing Joey: Is there
something wrong with the way we package zhone (a python script, not a
library)?

dh_auto_* looks at pyversions -r to determine which versions of python
the package is targeting, and builds it for each version to support
C python modules.

joey@gnu:~/tmp/zhone-0-git20090610>pyversions -r
pyversions: missing XS-Python-Version in control file, fall back to debian/pyversions
pyversions: missing debian/pyversions file, fall back to supported versions
python2.4 python2.5

We discussed possible breakage in #520834 but missed the case that python
script shebang lines would be modified like this. This seems to be done
by python2.4 setup.py, but not by python2.5 setup.py. In the latter case
you get #!/usr/bin/python. (Is this a bug in python2.4?)

Weird, dh should already take care of this:

$ grep shebang -C1 /usr/share/perl5/Debian/Debhelper/Buildsystem/python_distutils.pm
          # We need to to run setup.py with the default python first
          # as distutils/setuptools modifies the shebang lines of scripts.
          # This ensures that #!/usr/bin/python is used and not pythonX.Y

And, when I rebuild zhone from source, /usr/bin/zhone indeed ends up with the proper #!/usr/bin/python shebang.

--
Jakub Wilk


Reply to: