Dependency problem replacing dh_python with dh_pysupport

2006-08-20 Thread Cameron Dale

I'm currently working on updating my package to use python-support,
and I'm having problems with the dependencies it's generating. I've
removed dh_python from my rules file and deleted debian/pycompat so
that only dh_pysupport is generating the ${python:Depends}. However,
when I build the package, the dependencies generated only include
python-support, and not python (which dh_python used to generate).
This should work though, as python-support depends on python, but this
causes lintian errors for

E: bittornado: python-script-but-no-python-dep ./usr/bin/bttrack.bittornado
N:
N:   Packages with scripts that are executed with python must depend on the
N:   package python. Those that have scripts executed with a versioned
N:   python package need a dependency on the equivalent version of python.
N:
N:   For example, if a script in the package uses #!/usr/bin/python, then
N:   the package needs a dependency on "python". If a script uses
N:   #!/usr/bin/python2.2, then the package need a dependency on
N:   "python2.2".
N:
N:   In some cases a weaker relationship, such as Suggests or Recommends,
N:   will be more appropriate.

I'm not sure if I'm doing something wrong, or if Lintian needs to be
updated to understand this dependency, or if python-support should be
generating the python dependency?

I'm using the latest versions of python-support and lintian in
unstable. I also tried adding the -d option to dh_pysupport but got
the same result.

Thanks,
Cameron Dale


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



Re: Dependency problem replacing dh_python with dh_pysupport

2006-08-20 Thread Pierre Habouzit
Le dim 20 août 2006 09:48, Cameron Dale a écrit :
> I'm currently working on updating my package to use python-support,
> and I'm having problems with the dependencies it's generating. I've
> removed dh_python from my rules file and deleted debian/pycompat so
> that only dh_pysupport is generating the ${python:Depends}. However,
> when I build the package, the dependencies generated only include
> python-support, and not python (which dh_python used to generate).
> This should work though, as python-support depends on python, but
> this causes lintian errors for
>
> E: bittornado: python-script-but-no-python-dep
> ./usr/bin/bttrack.bittornado

this is a lintian "bug". when you simply need to depend upon python (not 
versionned) as python-support and python-central already do, and that 
you depend upon them, the depends is not added.

lintian has to be fixed in that regard.
-- 
·O·  Pierre Habouzit
··O[EMAIL PROTECTED]
OOOhttp://www.madism.org


pgp5lzVVNhHbb.pgp
Description: PGP signature


Re: Dependency problem replacing dh_python with dh_pysupport

2006-08-20 Thread Cameron Dale

On 8/20/06, Pierre Habouzit <[EMAIL PROTECTED]> wrote:

Le dim 20 août 2006 09:48, Cameron Dale a écrit :
> E: bittornado: python-script-but-no-python-dep
> ./usr/bin/bttrack.bittornado

this is a lintian "bug". when you simply need to depend upon python (not
versionned) as python-support and python-central already do, and that
you depend upon them, the depends is not added.

lintian has to be fixed in that regard.


Thanks for the reply. I guess I'll file a bug against lintian.

Cameron Dale



Re: Bug#383958: lintian: python-script-but-no-python-dep error with python-support

2006-08-20 Thread Russ Allbery
[ Resending to get the right address -- sorry about that. ]

Cameron Dale <[EMAIL PROTECTED]> writes:

> Package: lintian
> Version: 1.23.22
> Severity: wishlist

> Lintian generates python-script-but-no-python-dep errors for 
> binary packages depending on python-support (which depends on
> python). These dependencies are sufficient and are generated
> automatically by the dh_pysupport debhelper script.

> I asked on debian-python and they said this was a bug in
> lintian and not in python-support:

> http://lists.debian.org/debian-python/2006/08/msg00098.html

I don't think I agree with this.

python-support is a package that, at least according to its long
description, says that it provides a script that byte-compiles Python
modules.  Nothing in the description of the package says that it provides
a Python interpreter.  It happens to do so *now* because of its
dependencies, but suppose there were some reason down the road why it
might depend on some specific version of Python that didn't provide the
/usr/bin/python interpreter or otherwise changes its functionality in some
way.

Please don't rely on transitive dependencies.  It's just a lurking bug
waiting to happen.  Your package contains a Python script which requires a
Python interpreter.  It should therefore depend on the package that
provides the Python interpreter.  Unless python-support is defined to
provide a Python interpreter, it's not the correct package to depend on
for that purpose.

In general, for every interface, system service, or binary that your
package uses, you should depend directly on the package that provides that
interface, system service, or binary unless that package is essential, and
not assume that some other dependency will provide it for you.  Time and
again, transitions in Debian have proven that such assumptions break over
time and suddenly make packages RC-buggy.  Yes, sometimes it's very
unlikely that such a transition will happen, but I think it's better as a
general rule to be sure.

If it's really the intention that python-support will always provide a
Python interpreter, that should be added to its long description so that
there's documentation that this is an invariant and a promise that won't
be changed later.

-- 
Russ Allbery ([EMAIL PROTECTED])   


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



Re: Bug#383958: lintian: python-script-but-no-python-dep error with python-support

2006-08-20 Thread Pierre Habouzit
Le lun 21 août 2006 02:30, Russ Allbery a écrit :
> [ Resending to get the right address -- sorry about that. ]
>
> Cameron Dale <[EMAIL PROTECTED]> writes:
> > Package: lintian
> > Version: 1.23.22
> > Severity: wishlist
> >
> > Lintian generates python-script-but-no-python-dep errors for
> > binary packages depending on python-support (which depends on
> > python). These dependencies are sufficient and are generated
> > automatically by the dh_pysupport debhelper script.
> >
> > I asked on debian-python and they said this was a bug in
> > lintian and not in python-support:
> >
> > http://lists.debian.org/debian-python/2006/08/msg00098.html
>
> I don't think I agree with this.
>
> [snip]
>
> If it's really the intention that python-support will always provide
> a Python interpreter, that should be added to its long description so
> that there's documentation that this is an invariant and a promise
> that won't be changed later.

python-support is written in python (same is true for python-central) 
and will *always* depend upon 'python'
-- 
·O·  Pierre Habouzit
··O[EMAIL PROTECTED]
OOOhttp://www.madism.org


pgpqp9RL7JVaM.pgp
Description: PGP signature


Re: Bug#383958: lintian: python-script-but-no-python-dep error with python-support

2006-08-20 Thread Russ Allbery
Pierre Habouzit <[EMAIL PROTECTED]> writes:
> Le lun 21 août 2006 02:30, Russ Allbery a écrit :

>> If it's really the intention that python-support will always provide
>> a Python interpreter, that should be added to its long description so
>> that there's documentation that this is an invariant and a promise
>> that won't be changed later.

> python-support is written in python (same is true for python-central) 
> and will *always* depend upon 'python'

Please see the rest of the message that I just wrote.  Your response
doesn't address my concerns.

-- 
Russ Allbery ([EMAIL PROTECTED])   



Re: Bug#383958: lintian: python-script-but-no-python-dep error with python-support

2006-08-20 Thread Adeodato Simó
* Russ Allbery [Sun, 20 Aug 2006 17:30:39 -0700]:

> Please don't rely on transitive dependencies.  It's just a lurking bug
> waiting to happen.  Your package contains a Python script which requires a
> Python interpreter.  It should therefore depend on the package that
> provides the Python interpreter.  Unless python-support is defined to
> provide a Python interpreter, it's not the correct package to depend on
> for that purpose.

> In general, for every interface, system service, or binary that your
> package uses, you should depend directly on the package that provides that
> interface, system service, or binary unless that package is essential, and
> not assume that some other dependency will provide it for you.  Time and
> again, transitions in Debian have proven that such assumptions break over
> time and suddenly make packages RC-buggy.  Yes, sometimes it's very
> unlikely that such a transition will happen, but I think it's better as a
> general rule to be sure.

JFTR, the bug is solely in python-support, and not in the package
lacking the dependency: although not advertised in the description
(which is user-oriented), python-support also takes care at build time
of generating a list of needed dependencies and placing it in the
${python:Depends} substvar.

With this, it's reasonable to expect for it to provide a correct list of
such dependencies, which should include "python" for packages shiping
scripts invoking /usr/bin/python.

Thanks,

-- 
Adeodato Simó dato at net.com.org.es
Debian Developer  adeodato at debian.org
 
 Listening to: Mirafiori - Cinco minutos


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



Re: Bug#383958: lintian: python-script-but-no-python-dep error with python-support

2006-08-20 Thread Russ Allbery
Pierre Habouzit <[EMAIL PROTECTED]> writes:

> python-support is written in python (same is true for python-central) 
> and will *always* depend upon 'python'

Maybe some examples to illustrate will help.  It may not be entirely clear
why the above statement doesn't actually resolve the problem.

Suppose that, due to some changes to how byte-compiling is done for Python
3.0, it's necessary to write the script in python-support to require
Python 3.0.  It therefore might depend on python3.0 instead of python, and
hence wouldn't cause a /usr/bin/python to be installed.

Suppose that with Python 4.0, the python-support script, still written in
Python, makes sense to distribute as an executable compiled to native code
and therefore depending on Python libraries but not needing an interpreter
at all.

You can decide that installing python-support is a way to get a
/usr/bin/python interpreter, but there's no inherent reason why this
should be the case.  Furthermore, I don't think that's actually the right
approach.  It adds complexity to dependency analysis without really
gaining anything.

Let me turn this around:  what advantage is there to the current approach?
Why would you ever want a package containing a Python script to depend on
python-support and *not* python?  Is this just saving eight bytes in the
Depends field, and if so, is that really worth it for, say, not being able
to locate all packages that depend on Python by simply looking for
packages that depend on Python (rather than having to also factor in
packages that use transitive dependencies)?

-- 
Russ Allbery ([EMAIL PROTECTED])   


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



Re: Bug#383958: lintian: python-script-but-no-python-dep error with python-support

2006-08-20 Thread Pierre Habouzit
Le lun 21 août 2006 03:53, Russ Allbery a écrit :
> Pierre Habouzit <[EMAIL PROTECTED]> writes:
> > python-support is written in python (same is true for
> > python-central) and will *always* depend upon 'python'
>
> Maybe some examples to illustrate will help.  It may not be entirely
> clear why the above statement doesn't actually resolve the problem.
>
> [snip]
>
> Let me turn this around:  what advantage is there to the current
> approach? Why would you ever want a package containing a Python
> script to depend on python-support and *not* python?  Is this just
> saving eight bytes in the Depends field, and if so, is that really
> worth it for, say, not being able to locate all packages that depend
> on Python by simply looking for packages that depend on Python
> (rather than having to also factor in packages that use transitive
> dependencies)?

that's indeed a fair question, maybe python-support should not be too 
clever and let 'python' be explicitely listed, even if it's *currently* 
not needed.

Also note that if versionned depends are needed (like a python (>= X.Y)) 
it is obviously added, so that "problem" hits only arch:all packages 
that do not need a specific python version...

Maybe Joss will have more insight about that.
-- 
·O·  Pierre Habouzit
··O[EMAIL PROTECTED]
OOOhttp://www.madism.org


pgpyLqg3RUADC.pgp
Description: PGP signature