Bug#501688: dh-make-perl ignoring build_requires in Makefile.PL

Gunnar Wolf gwolf at gwolf.org
Mon Oct 13 00:40:33 UTC 2008


Mark Lawrence dijo [Thu, Oct 09, 2008 at 05:37:46PM +0200]:
> dh-make-perl appears to either ignore, or doesn't recognise the
> build_requires statement used in Module::Install type Makefile.PL
> files.
> 
>     build_requires  'Test::More'            => 0;
>     build_requires  'Test::Exception'       => 0;
>     build_requires  'Test::Memory::Cycle'   => 0;
>     build_requires  'Test::Pod'             => 0;
> 
> Consequently the Build-Depends: tag in debian/control is not correct.

Hi,

This is due to the fact that dependency information is acquired via
Module::Depends::Intrusive, not by de-constructing Makefile.PL - And
yes, this leaves the packages generated by dh-make-perl with complete
information for the packages themselves, but sometimes incomplete
information about their build-dependencies.

I think there are two ways out of this one: The first one is to add a
simple parsing for "build_requires" on Makefile.PL (and, of course,
noting it as build-dependencies, not as dependencies). The second one
is to run via Module::Depends::Intrusive the tests as well.

The main problem with the first way is that we'd have to do separate
(but very similar) logic for the different build systems; the problem
with the second one is that we don't want to actually run the tests
beforehand - I'm not really familiar with Module::Depends::Intrusive,
but it would probably require running and not just compiling the code
(i.e. as modules are often required by calling "use_ok" instead of the
regular "use"), and it could lead to funny circles (as tests use the
module we are building) probably tricky to break.

Anyway, probably the only feasible way is the first one... but I don't
really like it - it will uglify (even!) more our code with repetition :-(

-- 
Gunnar Wolf - gwolf at gwolf.org - (+52-55)5623-0154 / 1451-2244
PGP key 1024D/8BB527AF 2001-10-23
Fingerprint: 0C79 D2D1 2C4E 9CE4 5973  F800 D80E F35A 8BB5 27AF





More information about the pkg-perl-maintainers mailing list