[debhelper-devel] [debhelper] 01/09: Remove support for compat 4

Niels Thykier nthykier at moszumanska.debian.org
Wed Jun 15 20:29:16 UTC 2016


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

nthykier pushed a commit to branch master
in repository debhelper.

commit 615b11be1b4883869ed3ef5747f9e5ad4345e955
Author: Niels Thykier <niels at thykier.net>
Date:   Tue Jun 14 18:08:50 2016 +0000

    Remove support for compat 4
    
    Signed-off-by: Niels Thykier <niels at thykier.net>
---
 Debian/Debhelper/Dh_Lib.pm |  2 +-
 debhelper.pod              | 58 +---------------------------------------------
 debian/changelog           |  1 +
 dh_install                 | 13 ++++-------
 dh_installdocs             |  8 ++-----
 dh_strip                   | 28 +++++-----------------
 6 files changed, 16 insertions(+), 94 deletions(-)

diff --git a/Debian/Debhelper/Dh_Lib.pm b/Debian/Debhelper/Dh_Lib.pm
index 55f08f9..213e7cc 100644
--- a/Debian/Debhelper/Dh_Lib.pm
+++ b/Debian/Debhelper/Dh_Lib.pm
@@ -783,7 +783,7 @@ sub filedoublearray {
 	while (<DH_FARRAY_IN>) {
 		chomp;
 		# Only ignore comments and empty lines in v5 mode.
-		if (! compat(4) && ! $x)  {
+		if (not $x)  {
 			next if /^#/ || /^$/;
 		}
 		my @line;
diff --git a/debhelper.pod b/debhelper.pod
index 7f20d1c..2e264ee 100644
--- a/debhelper.pod
+++ b/debhelper.pod
@@ -299,65 +299,9 @@ These are the available compatibility levels:
 
 =over 4
 
-=item v3
-
-This is the lowest supported compatibility level.
-
-This mode is deprecated.
-
-=item v4
-
-Changes from v3 are:
-
-=over 8
-
-=item -
-
-B<dh_makeshlibs -V> will not include the Debian part of the version number in
-the generated dependency line in the shlibs file.
-
-=item -
-
-You are encouraged to put the new B<${misc:Depends}> into F<debian/control> to
-supplement the B<${shlibs:Depends}> field.
-
-=item -
-
-B<dh_fixperms> will make all files in F<bin/> directories and in F<etc/init.d>
-executable.
-
-=item -
-
-B<dh_link> will correct existing links to conform with policy.
-
-=back
-
-This mode is deprecated.
-
 =item v5
 
-Changes from v4 are:
-
-=over 8
-
-=item -
-
-Comments are ignored in debhelper config files.
-
-=item -
-
-B<dh_strip --dbg-package> now specifies the name of a package to put debugging
-symbols in, not the packages to take the symbols from.
-
-=item -
-
-B<dh_installdocs> skips installing empty files.
-
-=item -
-
-B<dh_install> errors out if wildcards expand to nothing.
-
-=back
+This is the lowest supported compatibility level.
 
 =item v6
 
diff --git a/debian/changelog b/debian/changelog
index c99f622..446f731 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -26,6 +26,7 @@ debhelper (9.20160403+unreleased) UNRELEASED; urgency=medium
   * autoscripts/*inst-moveconffile: Remove unused files.
   * dh: Update documentation to reflect the current
     implementation.
+  * Remove support for compat 4.
 
  -- Niels Thykier <niels at thykier.net>  Sat, 09 Apr 2016 09:20:32 +0000
 
diff --git a/dh_install b/dh_install
index cd89887..f7d5739 100755
--- a/dh_install
+++ b/dh_install
@@ -199,17 +199,14 @@ foreach my $package (getpackages()) {
 				} else {
 					warning("Cannot find (any matches for) \"${glob}\" (tried in \"${srcdir}\" and \"debian/tmp\")");
 				}
-				# In compat 4, a non-matching glob was not fatal...
-				++$missing_files if not compat(4) or @found;
+				++$missing_files;
 			}
 		}
 
-		if (! compat(4)) { # check added in v5
-			if (! @filelist && ! $skip_install) {
-				warning("$package missing files: @$set");
-				++$missing_files;
-				next;
-			}
+		if (! @filelist && ! $skip_install) {
+			warning("$package missing files: @$set");
+			++$missing_files;
+			next;
 		}
 
 		foreach my $src (@filelist) { 
diff --git a/dh_installdocs b/dh_installdocs
index 8101654..6c924dd 100755
--- a/dh_installdocs
+++ b/dh_installdocs
@@ -214,17 +214,13 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
 	}
 
 	if (@docs) {
-		my $exclude = '';
+		my $exclude = ' -and ! -empty';
 		if ($dh{EXCLUDE_FIND}) {
 			$exclude .= ' -and ! \( '.$dh{EXCLUDE_FIND}.' \)';
 		}
-		if (! compat(4)) {
-			# ignore empty files in subdirs
-			$exclude .= ' -and ! -empty';
-		}
 		foreach my $doc (@docs) {
 			next if excludefile($doc);
-			next if -e $doc && ! -s $doc && ! compat(4); # ignore empty files
+			next if -e $doc && ! -s $doc; # ignore empty files
 			ensure_docdir($package);
 			if (-d $doc && length $exclude) {
 				my $basename = basename($doc);
diff --git a/dh_strip b/dh_strip
index ef5f517..615ba1c 100755
--- a/dh_strip
+++ b/dh_strip
@@ -60,12 +60,6 @@ package.
 For example, if your packages are libfoo and foo and you want to include a
 I<foo-dbg> package with debugging symbols, use B<dh_strip --dbg-package=>I<foo-dbg>.
 
-Note that this option behaves significantly different in debhelper
-compatibility levels 4 and below. Instead of specifying the name of a debug
-package to put symbols in, it specifies a package (or packages) which
-should have separated debug symbols, and the separated symbols are placed
-in packages with B<-dbg> added to their name.
-
 This option implies B<--no-automatic-dbgsym> and I<cannot> be used
 with B<--automatic-dbgsym> or B<--dbgsym-migration>.
 
@@ -300,23 +294,13 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
 	my $keep_debug=$dh{K_FLAG};
 	my $debugtmp=$tmp;
 	my $use_build_id = compat(8) ? 0 : 1;
-	if (! compat(4)) {
-		if (ref $dh{DEBUGPACKAGES}) {
-			$keep_debug=1;
-			# Note that it's only an array for the v4 stuff;
-			# for v5 only one value is used.
-			my $debugpackage=@{$dh{DEBUGPACKAGES}}[0];
-			if (!$all_packages{$debugpackage}) {
-				error("debug package $debugpackage is not listed in the control file");
-			}
-			$debugtmp=tmpdir($debugpackage);
-		}
-	}
-	else {
-		if (ref $dh{DEBUGPACKAGES} && grep { $_ eq $package } @{$dh{DEBUGPACKAGES}}) {
-			$keep_debug=1;
-			$debugtmp=tmpdir($package."-dbg");
+	if (ref $dh{DEBUGPACKAGES}) {
+		$keep_debug=1;
+		my $debugpackage=@{$dh{DEBUGPACKAGES}}[0];
+		if (!$all_packages{$debugpackage}) {
+			error("debug package $debugpackage is not listed in the control file");
 		}
+		$debugtmp=tmpdir($debugpackage);
 	}
 	# Temporary workaround: Do not build dbgsym packages for udebs as
 	# dpkg-gencontrol and dpkg-deb does not agree on the file

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