]> git.donarmstrong.com Git - debhelper.git/blobdiff - Debian/Debhelper/Dh_Lib.pm
r343: * Detect changelog parse failures and use a better error message.
[debhelper.git] / Debian / Debhelper / Dh_Lib.pm
index 915d37af3a80f3b99d7b95116cc025980eaea044..49d9d6d0aab3404c8717c21dcec899ce645efc8f 100644 (file)
@@ -264,6 +264,11 @@ sub pkgext { my $package=shift;
                        my $version=`dpkg-parsechangelog -l$isnative_changelog`;
                        ($dh{VERSION})=$version=~m/Version: (.*)/m;
 
+                       # Did the changelog parse fail?
+                       if (! defined $dh{VERSION}) {
+                               error("changelog parse failure");
+                       }
+
                        # Is this a native Debian package?
                        if ($dh{VERSION}=~m/.*-/) {
                                $isnative_cache{$package}=0;