summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiels Thykier <niels@thykier.net>2022-11-19 14:42:30 +0000
committerNiels Thykier <niels@thykier.net>2022-11-20 15:54:32 +0000
commit5125770831bda144acdd9e4c32aa4d2f95a8c42f (patch)
treee4049fe2a7998c461e46a4811f0eaf264b1d1ffa
parent4cf2075c47fdd22ab860b35f4732b35003973dea (diff)
Remove obsolete compat checks in the code
Signed-off-by: Niels Thykier <niels@thykier.net>
-rwxr-xr-xdh_builddeb10
-rwxr-xr-xdh_installman1
-rwxr-xr-xdh_installwm12
-rw-r--r--lib/Debian/Debhelper/Dh_Lib.pm3
4 files changed, 7 insertions, 19 deletions
diff --git a/dh_builddeb b/dh_builddeb
index 7d36fa3e..bcaacc0d 100755
--- a/dh_builddeb
+++ b/dh_builddeb
@@ -142,15 +142,7 @@ on_items_in_parallel(\@items, sub {
next;
}
if (exists $ENV{DH_ALWAYS_EXCLUDE} && length $ENV{DH_ALWAYS_EXCLUDE}) {
- if (! compat(5)) {
- complex_doit("find $tmp $dh{EXCLUDE_FIND} | xargs rm -rf");
- }
- else {
- # Old broken code here for compatibility. Does not
- # remove everything.
- complex_doit("find $tmp -name $_ | xargs rm -rf")
- foreach split(":", $ENV{DH_ALWAYS_EXCLUDE});
- }
+ complex_doit("find $tmp $dh{EXCLUDE_FIND} | xargs rm -rf");
}
if (! is_udeb($package)) {
doit("dpkg-deb", @dpkg_options, @{$dh{U_PARAMS}}, "--build", $tmp, $dh{DESTDIR}.$dh{FILENAME});
diff --git a/dh_installman b/dh_installman
index 4ad877e6..015d439d 100755
--- a/dh_installman
+++ b/dh_installman
@@ -257,7 +257,6 @@ on_items_in_parallel(\@all_packages, sub {
my $instpage = "$destdir$instname.$section";
next if -l $instpage;
- next if -e _ && compat(5);
install_dir($destdir);
if ($gz) {
diff --git a/dh_installwm b/dh_installwm
index d3b4f7d5..d5e0599d 100755
--- a/dh_installwm
+++ b/dh_installwm
@@ -109,13 +109,11 @@ WM: foreach my $wm (@wm) {
autoscript($package,"prerm","prerm-wm", { 'WM' => $wm });
my $wmman;
- if (! compat(5)) {
- foreach my $ext (".1", ".1x") {
- $wmman="/usr/share/man/man1/".basename($wm).$ext;
- if (-e "$tmp$wmman" || -e "$tmp$wmman.gz") {
- autoscript($package,"postinst","postinst-wm", { 'WM' => $wm, 'WMMAN' => "${wmman}.gz" , 'PRIORITY' => $dh{PRIORITY} });
- next WM;
- }
+ foreach my $ext (".1", ".1x") {
+ $wmman="/usr/share/man/man1/".basename($wm).$ext;
+ if (-e "$tmp$wmman" || -e "$tmp$wmman.gz") {
+ autoscript($package,"postinst","postinst-wm", { 'WM' => $wm, 'WMMAN' => "${wmman}.gz" , 'PRIORITY' => $dh{PRIORITY} });
+ next WM;
}
}
if (not compat(9) and not $nodocs) {
diff --git a/lib/Debian/Debhelper/Dh_Lib.pm b/lib/Debian/Debhelper/Dh_Lib.pm
index 0b35ab58..da5d7962 100644
--- a/lib/Debian/Debhelper/Dh_Lib.pm
+++ b/lib/Debian/Debhelper/Dh_Lib.pm
@@ -1243,8 +1243,7 @@ sub autoscript {
}
}
- if (-e $outfile && ($script eq 'postrm' || $script eq 'prerm')
- && !compat(5)) {
+ if (-e $outfile && ($script eq 'postrm' || $script eq 'prerm')) {
# Add fragments to top so they run in reverse order when removing.
if (not defined($sed) or ref($sed)) {
verbose_print("[META] Prepend autosnippet \"$filename\" to $script [${outfile}.new]");