r27246 - /trunk/dh-make-perl/dh-make-perl

dmn at users.alioth.debian.org dmn at users.alioth.debian.org
Tue Nov 25 08:37:53 UTC 2008


Author: dmn
Date: Tue Nov 25 08:37:47 2008
New Revision: 27246

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=27246
Log:
extract_depends: try Module::Depends first, ::Intrusive -- second

reverse the logic around Module::Depends::Intrusive and Module::Depends

This fixes finding module dependencies for modules that provide a proper
META.yml file. Partly addresses #501688

Modified:
    trunk/dh-make-perl/dh-make-perl

Modified: trunk/dh-make-perl/dh-make-perl
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/dh-make-perl?rev=27246&op=diff
==============================================================================
--- trunk/dh-make-perl/dh-make-perl (original)
+++ trunk/dh-make-perl/dh-make-perl Tue Nov 25 08:37:47 2008
@@ -9,6 +9,7 @@
 use Getopt::Long;
 use Cwd;
 use CPAN;
+use Module::Depends;
 use Module::Depends::Intrusive;
 use Email::Date::Format qw(email_date);
 use Text::Wrap;
@@ -887,32 +888,28 @@
 
     $dir .= '/' unless $dir =~ m/\/$/;
 
-    # try Module::Depends::Intrusive, but if that fails then
-    # fall back to Module::Depends.
-
-    eval { %dep_hash = run_depends( 'Module::Depends::Intrusive', $dir ); };
+    # try Module::Depends, but if that fails then
+    # fall back to Module::Depends::Intrusive.
+
+    eval { %dep_hash = run_depends( 'Module::Depends', $dir ); };
     if ($@) {
         warn '=' x 70, "\n";
-        warn "First attempt (Module::Depends::Intrusive) at a dependency\n"
-            . "check failed. Possible use of Module::Install ?\n"
-            . "Trying again with Module::Depends ... \n";
+        warn "First attempt (Module::Depends) at a dependency\n"
+            . "check failed. Missing/bad META.yml?\n"
+            . "Trying again with Module::Depends::Intrusive ... \n";
         warn '=' x 70, "\n";
 
-        eval { %dep_hash = run_depends( 'Module::Depends', $dir ); };
-
+    eval { %dep_hash = run_depends( 'Module::Depends::Intrusive', $dir ); };
         if ($@) {
             warn '=' x 70, "\n";
             warn
                 "Could not find the dependencies for the requested module.\n";
             warn "Generated error: $@";
 
-            warn "Please check if your module depends on Module::Install\n"
-                . "for its build process - Automatically finding its\n"
-                . "dependencies is unsupported, please specify them manually\n"
-                . "using the 'depends' option. \n";
-            warn
-                "Alternatively, including a META.yml file with dependencies\n"
-                . "should allow discovery even for Module::Install modules. \n";
+            warn "Please bug the module author to provide a proper META.yml\n"
+                . "file.\n"
+                . "Automatic find of dependencies failed. You may want to \n"
+                . "retry using the 'depends' option\n";
             warn '=' x 70, "\n";
         }
     }




More information about the Pkg-perl-cvs-commits mailing list