summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiels Thykier <niels@thykier.net>2015-11-21 01:37:24 +0100
committerNiels Thykier <niels@thykier.net>2015-11-21 01:37:24 +0100
commit8994b09c30cf32a5c1e84d6d94a548ad8b5de089 (patch)
tree072b1c2ad1308c959a32b91bd3b3a7a88c988896
parent118a68607d3e068a26bac3f506938d308c658fa8 (diff)
downloaddebhelper-8994b09c30cf32a5c1e84d6d94a548ad8b5de089.tar.gz
Remove some compat(2) guards
Signed-off-by: Niels Thykier <niels@thykier.net>
-rwxr-xr-xdh_installdeb2
-rwxr-xr-xdh_movefiles30
2 files changed, 7 insertions, 25 deletions
diff --git a/dh_installdeb b/dh_installdeb
index 591669e9..70bb1e6e 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 d8ce7b10..52a12bb1 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);