Bug#447520: dh-make-perl: [PATCH] do not use M::D::Intrusive if META.yml present

Oliver Gorwits oliver.gorwits at oucs.ox.ac.uk
Sun Oct 21 21:21:09 UTC 2007


Package: dh-make-perl
Version: 0.34
Severity: wishlist
Tags: patch

Hi,

I notice that a few packages using Module::Install fail with dh-make-perl
because Module::Depends::Intrusive throws an error.

The attached patch allows dh-make-perl to use plain Module::Depends if there
is a META.yml file present, which for many cases fixes this problem. If
there is no META.yml file in the distribution, then dh-make-perl will fall
back to trying Module::Depends::Intrusive.

regards,
oliver.

-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-5-686
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages dh-make-perl depends on:
ii  debhelper                     5.0.42     helper programs for debian/rules
ii  dpkg-dev                      1.13.25    package building tools for Debian
ii  fakeroot                      1.5.10     Gives a fake root environment
ii  libmodule-depends-perl        0.10-1     identify the dependencies of a dis
ii  libwww-mechanize-perl         1.18-1     Automate interaction with websites
ii  libyaml-perl                  0.62-1     YAML Ain't Markup Language (tm)
ii  make                          3.81-2     The GNU version of the "make" util
ii  perl                          5.8.8-7    Larry Wall's Practical Extraction 
ii  perl-modules [libpod-parser-p 5.8.8-7    Core Perl modules

Versions of packages dh-make-perl recommends:
ii  apt-file                      2.0.8.2    APT package searching utility -- c
ii  libmodule-build-perl          0.26-1     Subclassable and make-independant 

-- no debconf information
-------------- next part --------------
diff -urN dh-make-perl.orig/dh-make-perl dh-make-perl/dh-make-perl
--- dh-make-perl.orig/dh-make-perl	2007-10-21 22:17:53.000000000 +0100
+++ dh-make-perl/dh-make-perl	2007-10-21 22:18:36.000000000 +0100
@@ -643,14 +643,16 @@
 
 	$dir .= '/' unless $dir =~ m/\/$/;
 
-	### Mental note to self: It'd be worth it to fall back to 
-	### Module:::Depends and _only_ then fail
+	# use Module::Depends if there is a META.yml file, else
+	# fall back to Module::Depends::Intrusive
+	my $depends_module = (-f "$maindir/META.yml"
+	    ? 'Module::Depends' : 'Module::Depends::Intrusive');
 	eval {
 	    my $mod_dep;
 	    no warnings;
 	    local *STDERR;
 	    open(STDERR, ">/dev/null");
-	    $mod_dep = Module::Depends::Intrusive->new();
+	    $mod_dep = $depends_module->new();
 	
 	    $mod_dep->dist_dir( $dir );
 	    $mod_dep->find_modules();
@@ -664,7 +666,7 @@
 	    warn '='x70,"\n";
 	    warn "Could not find the dependencies for the requested module\n";
 
-	    warn "Module::Depends::Intrusive reports: $error\n" if $error;
+	    warn "$depends_module reports: $error\n" if $error;
 	    warn "Generated error: $@" if $@;
 
 	    warn "Please check if your module depends on Module::Install\n" .


More information about the pkg-perl-maintainers mailing list