[dh-make-perl] 01/02: Improve misleading error message if apt-file present but no contents files found

Axel Beckert abe at deuxchevaux.org
Wed Apr 22 23:51:35 UTC 2015


This is an automated email from the git hooks/post-receive script.

abe pushed a commit to branch master
in repository dh-make-perl.

commit deb0f08e9aef700925ec2462e026d3f00ee90c1f
Author: Axel Beckert <abe at deuxchevaux.org>
Date:   Wed Apr 22 20:33:12 2015 +0200

    Improve misleading error message if apt-file present but no contents files found
---
 debian/changelog                    | 7 ++++++-
 lib/DhMakePerl/Command/Packaging.pm | 9 +++++++++
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 6981726..98b145f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,14 @@
 dh-make-perl (0.84-3) UNRELEASED; urgency=medium
 
+  [ Damyan Ivanov ]
   * Config: fixup module name after possible setting it when run as 'cpan2deb'
     (Closes: #777718 -- cpan2deb using wrong module from CPAN)
 
- -- Damyan Ivanov <dmn at debian.org>  Fri, 13 Feb 2015 10:16:06 +0000
+  [ Axel Beckert ]
+  * Improve misleading error message if apt-file installed but no contents
+    files could be found.
+
+ -- Axel Beckert <abe at debian.org>  Wed, 22 Apr 2015 20:30:03 +0200
 
 dh-make-perl (0.84-2) unstable; urgency=medium
 
diff --git a/lib/DhMakePerl/Command/Packaging.pm b/lib/DhMakePerl/Command/Packaging.pm
index efbf99d..26438cd 100644
--- a/lib/DhMakePerl/Command/Packaging.pm
+++ b/lib/DhMakePerl/Command/Packaging.pm
@@ -36,6 +36,7 @@ use DhMakePerl::PodParser ();
 use File::Basename qw(basename dirname);
 use File::Find qw(find);
 use File::Path ();
+use File::Which;
 use File::Spec::Functions qw(catfile catpath splitpath);
 use Parse::DebianChangelog;
 use Text::Balanced qw(extract_quotelike);
@@ -1387,6 +1388,14 @@ sub discover_dependencies {
             }
         );
     }
+    elsif (which('apt-file')) {
+        warn "No APT contents can be loaded but apt-file seems installed.\n";
+        warn "Please run 'apt-file update' as root.\n";
+        warn "(If that doesn't help, please report a bug against dh-make-perl.)\n";
+        warn "Dependencies not updated.\n";
+
+        return ();
+    }
     else {
         warn "No APT contents can be loaded.\n";
         warn "Please install 'apt-file' package (at least version 2.5.0) and\n";

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/dh-make-perl.git



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