]> git.donarmstrong.com Git - debhelper.git/commitdiff
dh: Avoid compat deprecation warning before option parsing. Closes: #641361
authorJoey Hess <joey@kitenet.net>
Mon, 12 Sep 2011 22:52:42 +0000 (18:52 -0400)
committerJoey Hess <joey@kitenet.net>
Mon, 12 Sep 2011 22:52:42 +0000 (18:52 -0400)
Debian/Debhelper/Dh_Lib.pm
debian/changelog
dh

index e28cb326079c741a97b81f549cd502081dcb2ff8..60f13c30517664265b6b8b540b9bb8f0013381c1 100644 (file)
@@ -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;
                }
index cf0ba10b3767adfff694d049a6a8235b81f65fdb..acfb34bf6f8f784a9db020228156e14a3abf469c 100644 (file)
@@ -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 <joeyh@debian.org>  Mon, 12 Sep 2011 13:35:52 -0400
 
diff --git a/dh b/dh
index dff7f25d4ae438b02e6f9358c380114b085c4b70..3bcd069cadad6593e9d997942f277d5f20d3eb04 100755 (executable)
--- 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";