]> git.donarmstrong.com Git - debhelper.git/blobdiff - Debian/Debhelper/Dh_Lib.pm
r471: * Always include package name in maintainer script fragment filenames
[debhelper.git] / Debian / Debhelper / Dh_Lib.pm
index ef924b675474475e574f7b8044407d179347bba9..6185e19cd7ed2dbd07756c893545a9ef7d279b9d 100644 (file)
@@ -12,7 +12,7 @@ use vars qw(@ISA @EXPORT %dh);
 @ISA=qw(Exporter);
 @EXPORT=qw(&init &doit &complex_doit &verbose_print &error &warning &tmpdir
            &pkgfile &pkgext &isnative &autoscript &filearray &GetPackages
-           &xargs %dh);
+           &basename &xargs %dh &compat);
 
 my $max_compat=3;
 
@@ -60,9 +60,7 @@ sub init {
        # the default, doing them all.
        if (! defined $dh{DOPACKAGES} || ! @{$dh{DOPACKAGES}}) {
                if ($dh{DOINDEP} || $dh{DOARCH} || $dh{DOSAME}) {
-                       # User specified that all arch (in)dep package be 
-                       # built, and there are none of that type.
-                       error("I have no package to act on");
+                       error("You asked that all arch in(dep) packages be built, but there are none of that type.");
                }
                push @{$dh{DOPACKAGES}},@allpackages;
        }
@@ -262,10 +260,10 @@ sub pkgfile {
 sub pkgext {
        my $package=shift;
 
-       if ($package ne $dh{MAINPACKAGE}) {
-               return "$package.";
+       if (compat(1) and $package eq $dh{MAINPACKAGE}) {
+               return "";
        }
-       return "";
+       return "$package.";
 }
 
 # Returns 1 if the package is a native debian package, null otherwise.