[debhelper-devel] [debhelper] 01/02: Remove all compat(1) and compat(2) "guards"

Niels Thykier nthykier at moszumanska.debian.org
Mon Nov 2 20:43:01 UTC 2015


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

nthykier pushed a commit to branch master
in repository debhelper.

commit 505fa4d6b157bbcc810c5126a65c5fca1899161e
Author: Niels Thykier <niels at thykier.net>
Date:   Mon Nov 2 21:36:32 2015 +0100

    Remove all compat(1) and compat(2) "guards"
    
    Signed-off-by: Niels Thykier <niels at thykier.net>
---
 Debian/Debhelper/Dh_Lib.pm | 14 ++------------
 dh_clean                   |  5 +----
 dh_prep                    |  2 +-
 3 files changed, 4 insertions(+), 17 deletions(-)

diff --git a/Debian/Debhelper/Dh_Lib.pm b/Debian/Debhelper/Dh_Lib.pm
index de58576..cac077f 100644
--- a/Debian/Debhelper/Dh_Lib.pm
+++ b/Debian/Debhelper/Dh_Lib.pm
@@ -458,10 +458,6 @@ sub tmpdir {
 	if ($dh{TMPDIR}) {
 		return $dh{TMPDIR};
 	}
-	elsif (compat(1) && $package eq $dh{MAINPACKAGE}) {
-		# This is for back-compatibility with the debian/tmp tradition.
-		return "debian/tmp";
-	}
 	else {
 		return "debian/$package";
 	}
@@ -525,11 +521,7 @@ sub pkgfile {
 # Pass it a name of a binary package, it returns the name to prefix to files
 # in debian/ for this package.
 sub pkgext {
-	my $package=shift;
-
-	if (compat(1) and $package eq $dh{MAINPACKAGE}) {
-		return "";
-	}
+	my ($package) = @_;
 	return "$package.";
 }
 
@@ -790,12 +782,10 @@ sub filedoublearray {
 			next if /^#/ || /^$/;
 		}
 		my @line;
-		# Only do glob expansion in v3 mode.
-		#
 		# The tricky bit is that the glob expansion is done
 		# as if we were in the specified directory, so the
 		# filenames that come out are relative to it.
-		if (defined $globdir && ! compat(2) && ! $x) {
+		if (defined($globdir) && ! $x) {
 			foreach (map { glob "$globdir/$_" } split) {
 				s#^$globdir/##;
 				push @line, $_;
diff --git a/dh_clean b/dh_clean
index cd337ac..34b3d1a 100755
--- a/dh_clean
+++ b/dh_clean
@@ -100,9 +100,6 @@ doit('rm', '-rf', 'debian/.debhelper/') if not $dh{D_FLAG};
 # Remove all debhelper logs.
 if (! $dh{D_FLAG} && ! $dh{K_FLAG}) {
 	complex_doit("rm","-f","debian/*.debhelper.log");
-	if (compat(1)) {
-		doit("rm","-f","debian/debhelper.log");
-	}
 }
 
 if (! $dh{D_FLAG}) {
@@ -142,7 +139,7 @@ if (! $dh{D_FLAG}) {
 		\\( -type d -a -name autom4te.cache -prune -exec rm -rf {} + \\) \\)");
 }
 
-doit('rm', '-rf', 'debian/tmp') if -x 'debian/tmp' && ! compat(1) &&
+doit('rm', '-rf', 'debian/tmp') if -x 'debian/tmp' &&
                                    ! excludefile("debian/tmp");
 
 if (!compat(6) && !$dh{K_FLAG}) {
diff --git a/dh_prep b/dh_prep
index 5ec7fae..bceab81 100755
--- a/dh_prep
+++ b/dh_prep
@@ -55,7 +55,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
 		unless excludefile($tmp);
 }
 
-doit('rm', '-rf', 'debian/tmp') if -x 'debian/tmp' && ! compat(1) &&
+doit('rm', '-rf', 'debian/tmp') if -x 'debian/tmp'
                                    ! excludefile("debian/tmp");
 
 =head1 SEE ALSO

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debhelper/debhelper.git




More information about the debhelper-devel mailing list