From 78d072a8d942283723d94fbfb8f40e61d1f7fbe4 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 15 Jan 2012 14:22:28 -0400 Subject: [PATCH] v9 done * Finalized v9 mode, which is the new recommended default. (But continuing to use v8 is also fine.) * It is now deprecated for a package to not specify a compatability level in debian/compat. Debhelper now warns if this is not done, and packages without a debian/compat will eventually FTBFS. --- Debian/Debhelper/Dh_Lib.pm | 21 +++++++++++++-------- debhelper.pod | 22 +++++++++++++++++----- debian/changelog | 9 +++++++-- debian/compat | 2 +- doc/TODO | 4 +++- 5 files changed, 41 insertions(+), 17 deletions(-) diff --git a/Debian/Debhelper/Dh_Lib.pm b/Debian/Debhelper/Dh_Lib.pm index 3940c05..070c6d6 100644 --- a/Debian/Debhelper/Dh_Lib.pm +++ b/Debian/Debhelper/Dh_Lib.pm @@ -20,7 +20,7 @@ use vars qw(@ISA @EXPORT %dh); &is_make_jobserver_unavailable &clean_jobserver_makeflags &cross_command &set_buildflags &get_buildoption); -my $max_compat=9; +my $max_compat=10; sub init { my %params=@_; @@ -332,26 +332,31 @@ sub dirname { if (! defined $c) { $c=1; - if (defined $ENV{DH_COMPAT}) { - $c=$ENV{DH_COMPAT}; - } - elsif (-e 'debian/compat') { - # Try the file.. + if (-e 'debian/compat') { open (COMPAT_IN, "debian/compat") || error "debian/compat: $!"; my $l=; close COMPAT_IN; if (! defined $l || ! length $l) { - warning("debian/compat is empty, assuming level $c"); + warning("debian/compat is empty, assuming level $c") + unless defined $ENV{DH_COMPAT}; } else { chomp $l; $c=$l; } } + else { + warning("No compatability level specified in debian/compat"); + warning("This package will soon FTBFS; time to fix it!"); + } + + if (defined $ENV{DH_COMPAT}) { + $c=$ENV{DH_COMPAT}; + } } if ($c <= 4 && ! $warned_compat && ! $nowarn) { - warning("Compatibility levels before 5 are deprecated."); + warning("Compatibility levels before 5 are deprecated (level $c in use)"); $warned_compat=1; } diff --git a/debhelper.pod b/debhelper.pod index 1d1d907..ef1510e 100644 --- a/debhelper.pod +++ b/debhelper.pod @@ -267,9 +267,9 @@ introduced. You tell debhelper which compatibility level it should use, and it modifies its behavior in various ways. Tell debhelper what compatibility level to use by writing a number to -F. For example, to turn on v8 mode: +F. For example, to turn on v9 mode: - % echo 8 > debian/compat + % echo 9 > debian/compat Unless otherwise indicated, all debhelper documentation assumes that you are using the most recent compatibility level, and in most cases does not @@ -435,8 +435,6 @@ none is specified. =item v8 -This is the recommended mode of operation. - Changes from v7 are: =over 8 @@ -466,7 +464,7 @@ BI<*> prefer to use Perl's B in preference to F Tue, 03 Jan 2012 16:48:54 -0400 + -- Joey Hess Sun, 15 Jan 2012 13:59:49 -0400 debhelper (8.9.14) unstable; urgency=low diff --git a/debian/compat b/debian/compat index ec63514..f599e28 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -9 +10 diff --git a/doc/TODO b/doc/TODO index 573917f..cd2721f 100644 --- a/doc/TODO +++ b/doc/TODO @@ -1,10 +1,12 @@ -v9: +v10: * escaping in config files (for whitespace)? * dh_installinit --restart-after-upgrade as default? Deprecated: +* make a missing debian/compat an error. (started printing warning messages + in 20120115) * DH_COMPAT 1, 2, 3, 4. Can be removed once all packages are seen to be using a newer version. I won't hold my breath. (2 and 3 are getting close though.) * dh_suidregister. Once nothing in the archive uses it. -- 2.39.2