From 08fd6e5a07b96c2d7792a66458408916b754c97a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 12 Sep 2011 18:52:42 -0400 Subject: [PATCH] dh: Avoid compat deprecation warning before option parsing. Closes: #641361 --- Debian/Debhelper/Dh_Lib.pm | 3 ++- debian/changelog | 2 ++ dh | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Debian/Debhelper/Dh_Lib.pm b/Debian/Debhelper/Dh_Lib.pm index e28cb32..60f13c3 100644 --- a/Debian/Debhelper/Dh_Lib.pm +++ b/Debian/Debhelper/Dh_Lib.pm @@ -328,6 +328,7 @@ sub dirname { sub compat { my $num=shift; + my $nowarn=shift; if (! defined $c) { $c=1; @@ -349,7 +350,7 @@ sub dirname { } } - if ($c <= 4 && ! $warned_compat) { + if ($c <= 4 && ! $warned_compat && ! $nowarn) { warning("Compatibility levels before 5 are deprecated."); $warned_compat=1; } diff --git a/debian/changelog b/debian/changelog index cf0ba10..acfb34b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ debhelper (8.9.8) UNRELEASED; urgency=low * dh_fixperms: Operate on .ali files throughout /usr/lib, including multiarch dirs. Closes: #641279 + * dh: Avoid compat deprecation warning before option parsing. + Closes: #641361 -- Joey Hess Mon, 12 Sep 2011 13:35:52 -0400 diff --git a/dh b/dh index dff7f25..3bcd069 100755 --- a/dh +++ b/dh @@ -268,7 +268,7 @@ matches, the last one in the sequence will be used. # Stash this away before init modifies it. my @ARGV_orig=@ARGV; -if (compat(8)) { +if (compat(8, 1)) { # python-support was enabled by default before v9. # (and comes first so python-central loads later and can disable it). unshift @ARGV, "--with=python-support"; -- 2.39.2