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

dh_pycentral and dh_pysupport clash



Howdy all,

I'm having a conflict between 'dh_pycentral' and 'dh_pysupport' that I
can't see how to resolve.

Case study: 'python-minimock' <URL:http://ftp.debian.org/debian/pool/main/p/python-minimock/python-minimock_0.8-4.dsc>

Currently (in 0.8-4) the 'debian/rules' has the following targets of
interest:

=====
.PHONY: install
install: build
        dh --with python_central install --before pysupport
        dh --with python_central install --after pysupport

.PHONY: binary-indep
binary-indep: build install
        dh --with python_central binary-indep --before pysupport
        dh --with python_central binary-indep --after pysupport
=====

This builds, but *only* with both of 'python-central' and
'python-support' installed. However, the package shouldn't need
'python-central' at all; it wants to avoid it altogether.

When I test the package with 'pdebuild' in a 'sid' pbuilder, it fails:

=====
$ pdebuild ../build-area/python-minimock_0.8-4.dsc
[…]
 fakeroot debian/rules binary
dh build
dh --with python_central install --before pysupport
dh: command specification "pysupport" does not match any command in the sequence
make: *** [install] Error 1
dpkg-buildpackage: failure: fakeroot debian/rules binary gave error exit status 2
pbuilder: Failed autobuilding of package
 -> Aborting with an error
 -> unmounting dev/pts filesystem
 -> unmounting proc filesystem
 -> cleaning the build env
    -> removing directory /var/cache/pbuilder/build//7246 and its subdirectories
=====

This is presumably because 'python-support' is not installed, as is
correct for the package dependencies.


Ideally, I'd only need those rules to say:

=====
.PHONY: install
install: build
        dh --with python_central install

.PHONY: binary-indep
binary-indep: build install
        dh --with python_central binary-indep
=====

This does, in fact, cause the 'pdebuild' to succeed.

However, if 'python-support' *is* installed, then this causes *both*
of 'dh_pysupport' and 'dh_pycentral' to run, and the resulting package
fails 'lintian':

=====
$ bzr-buildpackage
[…]
dh --with python_central install
[…]
running install_scripts
[…]
   dh_pysupport --with python_central
Compatibility mode: using detected XS-Python-Version.
   dh_pycentral --with python_central
[…]

$ lintian -I ../build-area/python-minimock_0.8-4_powerpc.changes
E: python-minimock: malformed-python-version 2.4, 2.5, all
=====


Why is 'dh --with python_central install' running 'dh_pysupport' at
all? How can I stop that and only use 'dh_pycentral' as requested,
without breaking the package build in the absence of 'python-support'?

-- 
 \          “What I have to do is see, at any rate, that I do not lend |
  `\      myself to the wrong which I condemn.” —Henry Thoreau, _Civil |
_o__)                                                    Disobedience_ |
Ben Finney


Reply to: