[debhelper-devel] [debhelper] 01/01: d/compat files are now mandatory

Niels Thykier nthykier at moszumanska.debian.org
Sat Apr 16 08:05:07 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 821a8a44b47676d8d67e61302e7431a157cb332a
Author: Niels Thykier <niels at thykier.net>
Date:   Sat Apr 16 08:04:27 2016 +0000

    d/compat files are now mandatory
    
    Signed-off-by: Niels Thykier <niels at thykier.net>
---
 Debian/Debhelper/Dh_Lib.pm |  7 +++----
 debhelper.pod              |  5 ++++-
 debian/changelog           |  6 ++++++
 dh_clean                   | 11 -----------
 4 files changed, 13 insertions(+), 16 deletions(-)

diff --git a/Debian/Debhelper/Dh_Lib.pm b/Debian/Debhelper/Dh_Lib.pm
index bc2bd43..59da122 100644
--- a/Debian/Debhelper/Dh_Lib.pm
+++ b/Debian/Debhelper/Dh_Lib.pm
@@ -414,8 +414,8 @@ sub dirname {
 				my $l=<COMPAT_IN>;
 				close COMPAT_IN;
 				if (! defined $l || ! length $l) {
-					warning("debian/compat is empty, assuming level $c")
-						unless defined $ENV{DH_COMPAT};
+					error("debian/compat must contain a postive number (found: \"$c\")");
+
 				}
 				else {
 					chomp $l;
@@ -428,8 +428,7 @@ sub dirname {
 				}
 			}
 			elsif (not $nowarn) {
-				warning("No! compatibility level specified in debian/compat");
-				warning("This package will soon FTBFS; time to fix it!");
+				error("Please specific the compatibility level in debian/compat");
 			}
 
 			if (defined $ENV{DH_COMPAT}) {
diff --git a/debhelper.pod b/debhelper.pod
index 88caa27..cff20d6 100644
--- a/debhelper.pod
+++ b/debhelper.pod
@@ -265,6 +265,8 @@ includes both default and third party build systems (marked as such). Also
 shows which build system would be automatically selected, or which one
 is manually specified with the B<--buildsystem> option.
 
+This can be used without a F<debian/compat> file.
+
 =back
 
 =head1 COMPATIBILITY LEVELS
@@ -274,7 +276,8 @@ to debhelper, to keep it clean and well-designed as needs change and its
 author gains more experience. To prevent such major changes from breaking
 existing packages, the concept of debhelper compatibility levels was 
 introduced. You tell debhelper which compatibility level it should use, and
-it modifies its behavior in various ways.
+it modifies its behavior in various ways.  The compatibility level is
+specified in the F<debian/compat> file and the file must be present.
 
 Tell debhelper what compatibility level to use by writing a number to
 F<debian/compat>. For example, to turn on v9 mode:
diff --git a/debian/changelog b/debian/changelog
index ba689d1..f24ac9a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,12 @@ debhelper (9.20160403+unreleased) UNRELEASED; urgency=medium
     path segment in the package "tmpdir") being a symlink
     pointing outside the same directory.  Thanks to
     Bernhard Miklautz for the report.  (Closes: #820711)
+  * Dh_Lib.pm: Compat files are now mandatory.
+  * dh_clean: Remove work around for missing compat file.
+    This removes a confusing warning when the package is
+    not built by CDBS.  (Closes: #811059)
+  * debhelper.pod: Add a line stating that debian/compat
+    is mandatory.  (Closes: #805405)
 
  -- Niels Thykier <niels at thykier.net>  Sat, 09 Apr 2016 09:20:32 +0000
 
diff --git a/dh_clean b/dh_clean
index f5fc8ad..c58ec60 100755
--- a/dh_clean
+++ b/dh_clean
@@ -72,17 +72,6 @@ slash.  Any content in these directories will be removed as well.
 
 =cut
 
-if ( not -f 'debian/compat' and not $ENV{'DH_COMPAT'}) {
-	# Temporary work around - Permit a missing compat to work with
-	# cdbs's feature of auto-creating a d/compat file.
-	#  - Auto-bump to compat 5 to match cdbs (Not that it matters a lot,
-	#    since there is no compat conditions for 4 or less)
-	warning("Pretending DH_COMPAT was set to 5");
-	warning(" - this is a temporary measure to avoid FTBFS in packages");
-	warning("   relying on cdbs to set debian/compat to 5 during the build");
-	$ENV{'DH_COMPAT'} = 5;
-}
-
 init(options => {
 	"dirs-only" => \$dh{D_FLAG},
 });

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