[debhelper-devel] [debhelper] 01/01: Remove some compat(2) guards

Niels Thykier nthykier at moszumanska.debian.org
Sat Nov 21 00:49:20 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 8994b09c30cf32a5c1e84d6d94a548ad8b5de089
Author: Niels Thykier <niels at thykier.net>
Date:   Sat Nov 21 01:37:24 2015 +0100

    Remove some compat(2) guards
    
    Signed-off-by: Niels Thykier <niels at thykier.net>
---
 dh_installdeb |  2 +-
 dh_movefiles  | 30 ++++++------------------------
 2 files changed, 7 insertions(+), 25 deletions(-)

diff --git a/dh_installdeb b/dh_installdeb
index 591669e..70bb1e6 100755
--- a/dh_installdeb
+++ b/dh_installdeb
@@ -135,7 +135,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
 
 	# Automatic conffiles registration: If it is in /etc, it is a
 	# conffile.
-	if (! compat(2) && -d "$tmp/etc") {
+	if ( -d "$tmp/etc") {
 		complex_doit("find $tmp/etc -type f -printf '/etc/%P\n' | LC_ALL=C sort >> $tmp/DEBIAN/conffiles");
 		# Anything found?
 		if (-z "$tmp/DEBIAN/conffiles") {
diff --git a/dh_movefiles b/dh_movefiles
index d8ce7b1..52a12bb 100755
--- a/dh_movefiles
+++ b/dh_movefiles
@@ -98,40 +98,22 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
 
 	my (@tomove, @tomove_expanded);
 
-        # debian/files has a different purpose, so ignore it.
+	# debian/files has a different purpose, so ignore it.
 	if ($files && $files ne "debian/files" ) {
 		@tomove=filearray($files, $sourcedir);
 	}
 	
 	if (($package eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
-		if (compat(2)) {
-			# Pass through as-is and it will be expanded below
-			push(@tomove, @ARGV);
-		} else {
-			# Expand these manually as filearray already
-			push(@tomove_expanded, map { glob("$sourcedir/$_") } @ARGV);
-		}
+		# Expand these manually similar to filearray
+		push(@tomove_expanded, map { glob("$sourcedir/$_") } @ARGV);
 	}
 
 	if ((@tomove || @tomove_expanded) && $tmp eq $sourcedir) {
-		error("I was asked to move files from $sourcedir to $sourcedir. Perhaps you should set DH_COMPAT=2?");
+		error("I was asked to move files from $sourcedir to $sourcedir.");
 	}
 
-	# Now we need to expand wildcards in @tomove.
-	# This is only necessary in pre-v3 land -- as of v3, the
-	# expansion is automatically done by filearray().
-	if (@tomove && compat(2)) {
-		my @filelist=();
-		foreach (@tomove) {
-			push @filelist, glob("$sourcedir/$_");
-		}
-		@tomove=@filelist;
-	}
-	else {
-		# However, filearray() does not add the sourcedir,
-		# which we need.
-		@tomove = map { "$sourcedir/$_" } @tomove;
-	}
+	# filearray() does not add the sourcedir, which we need.
+	@tomove = map { "$sourcedir/$_" } @tomove;
 
 	push(@tomove, @tomove_expanded);
 

-- 
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