Debian Bug report logs - #668638
dh-make-perl: Incorrect dependency detection (because Module::Depends is used)

version graph

Package: dh-make-perl; Maintainer for dh-make-perl is Debian Perl Group <[email protected]>; Source for dh-make-perl is src:dh-make-perl (PTS, buildd, popcon).

Reported by: [email protected]

Date: Fri, 13 Apr 2012 19:03:02 UTC

Severity: normal

Found in version dh-make-perl/0.70-1

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to [email protected], Debian Perl Group <[email protected]>:
Bug#668638; Package dh-make-perl. (Fri, 13 Apr 2012 19:03:05 GMT) (full text, mbox, link).


Acknowledgement sent to [email protected]:
New Bug report received and forwarded. Copy sent to Debian Perl Group <[email protected]>. (Fri, 13 Apr 2012 19:03:05 GMT) (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: Slaven Rezic <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Subject: dh-make-perl: Incorrect dependency detection (because Module::Depends is used)
Date: Fri, 13 Apr 2012 21:02:05 +0200
Package: dh-make-perl
Version: 0.70-1
Severity: normal

When trying to build Tk::Wizard with dh-make-perl using

    dh-make-perl --cpan=Tk::Wizard --build

an obviously wrong dependecy was detected:

- Win32::TieRegistry  not found in any package
   CPAN contains it in Win32-TieRegistry
   substituting package name of libwin32-tieregistry-perl

Problem is very probably that META.yml is used for
dependency detection. This is wrong unless dynamic_config:0 is
set in the META file. If dynamic_config is not defined or
set to 1, then Makefile.PL or Build.PL must be run and
the created Makefile or Build must be inspected for the
correct dependencies (in newer Perls one can use the created
MYMETA* files instead).

META.yml is only meant for statistical analysis, but not for
real dependency resolution.

In the case of Tk::Wizard the Windows-specific module is
optional and only used on Windows systems. Probably the module
author was creating the distribution on a Windows system,
so the generated META.yml had this windows-specific module
in the prerequisites list. Just conincidence.

I can point you to the correct dependency detection code in
CPAN.pm. Maybe using Module::Depends::Intrusive *always*
would also do the right thing.

Regards,
    Slaven

-- System Information:
Debian Release: 6.0.4
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-028stab095.1 (SMP w/1 CPU core)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash

Versions of packages dh-make-perl depends on:
ii  debhelper              8.0.0             helper programs for debian/rules
ii  dpkg-dev               1.15.8.12         Debian package development tools
ii  fakeroot               1.14.4-1          Gives a fake root environment
ii  libapt-pkg-perl        0.1.24+b1         Perl interface to libapt-pkg
ii  libarray-unique-perl   0.08-1            Tie-able array that allows only un
ii  libclass-accessor-perl 0.34-1            Perl module that automatically gen
ii  libdpkg-perl           1.15.8.12         Dpkg perl modules
ii  libemail-date-format-p 1.002-1           Module to generate RFC-2822-valid 
ii  liblist-moreutils-perl 0.25~02-1         Perl module with additional list f
ii  libmodule-depends-perl 0.14-3            identify the dependencies of a dis
ii  libparse-debcontrol-pe 2.005-2           Easy OO parsing of Debian control-
ii  libparse-debianchangel 1.1.1-2.1         parse Debian changelogs and output
ii  libtie-ixhash-perl     1.21-2            ordered associative arrays for Per
ii  libwww-mechanize-perl  1.64-1            module to automate interaction wit
ii  libyaml-perl           0.71-1            YAML Ain't Markup Language
ii  make                   3.81-8            An utility for Directing compilati
ii  perl                   5.10.1-17squeeze3 Larry Wall's Practical Extraction 
ii  perl-modules [libmodul 5.10.1-17squeeze3 Core Perl modules

Versions of packages dh-make-perl recommends:
ii  apt-file                      2.4.0      search for files within Debian pac

dh-make-perl suggests no packages.

-- no debconf information




Information forwarded to [email protected], Debian Perl Group <[email protected]>:
Bug#668638; Package dh-make-perl. (Thu, 08 Aug 2013 16:30:04 GMT) (full text, mbox, link).


Message #8 received at [email protected] (full text, mbox, reply):

From: Damyan Ivanov <[email protected]>
To: [email protected], [email protected]
Subject: Re: Bug#668638: dh-make-perl: Incorrect dependency detection (because Module::Depends is used)
Date: Thu, 8 Aug 2013 19:26:51 +0300
[Message part 1 (text/plain, inline)]
Control: -1 tags confirmed

-=| Slaven Rezic, 13.04.2012 21:02:05 +0200 |=-
> Package: dh-make-perl
> Version: 0.70-1
> Severity: normal
> 
> When trying to build Tk::Wizard with dh-make-perl using
> 
>     dh-make-perl --cpan=Tk::Wizard --build
> 
> an obviously wrong dependecy was detected:
> 
> - Win32::TieRegistry  not found in any package
>    CPAN contains it in Win32-TieRegistry
>    substituting package name of libwin32-tieregistry-perl
> 
> Problem is very probably that META.yml is used for
> dependency detection. This is wrong unless dynamic_config:0 is
> set in the META file. If dynamic_config is not defined or
> set to 1, then Makefile.PL or Build.PL must be run and
> the created Makefile or Build must be inspected for the
> correct dependencies (in newer Perls one can use the created
> MYMETA* files instead).

Thanks for the explanation and sorry for replaying more than an year 
later.

> I can point you to the correct dependency detection code in
> CPAN.pm.

That would be very helpful indeed. Hopefully there is a way to just 
use some CPAN.pm-provided method to obtain this information.

> Maybe using Module::Depends::Intrusive *always* would also do the 
> right thing.

Tried that, but for this package M:D:Intrusive returns an empty hash 
:/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to [email protected], Debian Perl Group <[email protected]>:
Bug#668638; Package dh-make-perl. (Thu, 08 Aug 2013 20:30:14 GMT) (full text, mbox, link).


Acknowledgement sent to [email protected]:
Extra info received and forwarded to list. Copy sent to Debian Perl Group <[email protected]>. (Thu, 08 Aug 2013 20:30:14 GMT) (full text, mbox, link).


Message #13 received at [email protected] (full text, mbox, reply):

From: Slaven Rezic <[email protected]>
To: Damyan Ivanov <[email protected]>
Cc: [email protected]
Subject: Re: Bug#668638: dh-make-perl: Incorrect dependency detection (because Module::Depends is used)
Date: Thu, 08 Aug 2013 22:26:17 +0200
Damyan Ivanov <[email protected]> writes:

> Control: -1 tags confirmed
>
> -=| Slaven Rezic, 13.04.2012 21:02:05 +0200 |=-
>> Package: dh-make-perl
>> Version: 0.70-1
>> Severity: normal
>> 
>> When trying to build Tk::Wizard with dh-make-perl using
>> 
>>     dh-make-perl --cpan=Tk::Wizard --build
>> 
>> an obviously wrong dependecy was detected:
>> 
>> - Win32::TieRegistry  not found in any package
>>    CPAN contains it in Win32-TieRegistry
>>    substituting package name of libwin32-tieregistry-perl
>> 
>> Problem is very probably that META.yml is used for
>> dependency detection. This is wrong unless dynamic_config:0 is
>> set in the META file. If dynamic_config is not defined or
>> set to 1, then Makefile.PL or Build.PL must be run and
>> the created Makefile or Build must be inspected for the
>> correct dependencies (in newer Perls one can use the created
>> MYMETA* files instead).
>
> Thanks for the explanation and sorry for replaying more than an year 
> later.
>
>> I can point you to the correct dependency detection code in
>> CPAN.pm.
>
> That would be very helpful indeed. Hopefully there is a way to just 
> use some CPAN.pm-provided method to obtain this information.
>
>> Maybe using Module::Depends::Intrusive *always* would also do the 
>> right thing.
>
> Tried that, but for this package M:D:Intrusive returns an empty hash 
> :/

With Debian now shipping perl 5.14.x, we have now the easier option to
fix the problem. Modern ExtUtils::MakeMaker and Module::Build write a
"MYMETA.yml" (and MYMETA.json) file when executing "perl Makefile.PL"
resp. "perl Build.PL", and this file contains all fields as META.yml,
but dynamically evaluated.

In the case of Tk::Wizard the requires field in MYMETA.yml looks like
this:

requires:
  Carp: 0
  Cwd: 0
  ExtUtils::testlib: 0
  File::Copy: 0
  File::Path: 0
  File::Spec: 0
  FileHandle: 0
  IO::Handle: 0
  LWP::UserAgent: 0
  Scalar::Util: 0
  Test::More: 0
  Tk: 0
  Tk::After: 0
  Tk::DialogBox: 0
  Tk::DirTree: 0
  Tk::ErrorDialog: 0
  Tk::Frame: 0
  Tk::LabFrame: 0
  Tk::MainWindow: 0
  Tk::ProgressBar: 0
  Tk::ROText: 0

That is, the Win32* modules are gone.

So probably the fix is: run Makefile.PL/Build.PL, and if there was a
MYMETA.yml file written, use this, else fallback to META.yml (the
fallback probably should never happen, so is worth a warning).

Regards,
    Slaven

-- 
Slaven Rezic - slaven <at> rezic <dot> de
  BBBike - route planner for cyclists in Berlin
  WWW version:                           http://www.bbbike.de
  Perl/Tk version for Unix and Windows:  http://bbbike.sourceforge.net



Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Tue May 13 15:59:28 2025; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.