summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiels Thykier <niels@thykier.net>2016-04-16 08:04:27 +0000
committerNiels Thykier <niels@thykier.net>2016-04-16 08:04:27 +0000
commit821a8a44b47676d8d67e61302e7431a157cb332a (patch)
tree500a12d147996c7303cf353bb20594cf8bec3c7f
parent1418796f85ce27401673442e19977957d94079fe (diff)
downloaddebhelper-821a8a44b47676d8d67e61302e7431a157cb332a.tar.gz
d/compat files are now mandatory
Signed-off-by: Niels Thykier <niels@thykier.net>
-rw-r--r--Debian/Debhelper/Dh_Lib.pm7
-rw-r--r--debhelper.pod5
-rw-r--r--debian/changelog6
-rwxr-xr-xdh_clean11
4 files changed, 13 insertions, 16 deletions
diff --git a/Debian/Debhelper/Dh_Lib.pm b/Debian/Debhelper/Dh_Lib.pm
index bc2bd438..59da1229 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 88caa273..cff20d66 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 ba689d17..f24ac9a2 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@thykier.net> Sat, 09 Apr 2016 09:20:32 +0000
diff --git a/dh_clean b/dh_clean
index f5fc8adc..c58ec60d 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},
});