-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello again,

Am 07.10.2011 01:56, schrieb Jonas Meurer:
> It seems like dh_python2 doesn't behave as expected for packages which
> contains only private modules and where X-Python-Version is set to a
> fixed python version (e.g. '2.6' or '2.7').
> 
> In particular, dh_python2 adds the following depends to the zope2.12
> package: "python (>= 2.6.6-7~), python (<< 2.6)". This renders the
> package uninstallable.

After taking a first look at the code, I've got the feeling that
dh_python2 is fundamentally broken for packages that don't use the
default python version.

In case that X-Python-Version is set to a fixed version (e.g. '2.6'),
options.vrange has value ((2, 6), (2, 6)). Given to Dependencies.parse()
from debpython/depends.py, this results in the ambiguous dependency on
'python (>= 2.6.6-7~), python (<< 2.6)'.

The first problem is that Dependencies.parse() uses the second tuple
from vrange as maximum python version, but returns '(<< X.X)'. I guess
that this should rather be '(=< X.X)'.

The second problem is much more general: I don't see why the versioned
depends on python are added at all. If the package has X-Python-Version
set to '2.6', this should result in a dependency on 'python2.6', which
might be versioned if required. But adding a dependency on 'python (>=
MIN), python (=< MAX)' makes no sense to me. Once the default python
version is bumped to a new major version, the package will be rendered
uninstallable. This might make sense for packages which use the default
python in shebang - but require a special version. But for packages
which take care of the python version in shebang, a dependency on
pythonX.X would be sufficient.

Maybe I'm totally wrong. Please bear with me in that case. It's the
first time that I look into the dh_python2 code.

Greetings,
 jonas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJOj2KBAAoJEFJi5/9JEEn+m+sP/3famkCCPwIHDDV9ITz9FevC
7sRgZRDZWOoD8F+SbJChSxkYpcbM6CR/RGT0nfRavi1/mBQSQmVOmGrqull/gAmj
nFZJovoWC6jJ763aeVE4w0dn6dNrMe018RROFKpYyc4JFuBXDJaJrdacVdZpeLGZ
U7UVJnw1zyxxvVy68/j8dea43+E60l66CdPiz3rRyCtNSaorbo78rZ+JrpehmaBc
YTWc0kuc8CpIeAT5Ke8GbRUwyxBqWI2gb+EEWuVN4ZG9XJyQk18CBeBykcYpvmf5
C0YfQG7O5t0x9bi+rhbx2YwXVYsDiY8H7eEWR9DOuEwR/uQlnsGKQNdom9/eTZqv
f+YAKSaYpElRfVN0j//6ZXqN2yMgKHFeQ5XvoZ6d/APM3CY2ndLSNMtt3TzdHG4N
18ojmsZiD4B6ZC5Y7EcsOnGEc+pMSyUJtFTrrKyanGpUnZ68yl2fd3pU2NavobyC
QllbX8j/0XPRvSPII3ExE89h9lmEh2lXNNXGX13kFKNI4I0fglhotkk4wv5ewLF6
YpFe8X3VoCGylA+SEx9ENWyx+NEOP6zMlBXg27hzwG1SGDWxWHa6X9FZhR1+n1w7
ckZWUzFWWfm2r/14ud1Z6qGRlT18VpoFiaHpY4QX6O/OQnR2dxniSKFbdNjBhoTm
637UCMrLhZidVChuZ/Z2
=zI93
-----END PGP SIGNATURE-----



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to