]> git.donarmstrong.com Git - debhelper.git/commitdiff
dh_listpackages: Do not display warnings if options cause no packages to be listed.
authorJoey Hess <joey@kitenet.net>
Mon, 22 Nov 2010 23:23:29 +0000 (19:23 -0400)
committerJoey Hess <joey@kitenet.net>
Mon, 22 Nov 2010 23:23:29 +0000 (19:23 -0400)
Debian/Debhelper/Dh_Getopt.pm
debian/changelog
dh_listpackages

index 257fe6493c8d6de61600dbf3c0f596837c7f5882..e4f3e4718fcab4b2e229c2e50c493348662d952a 100644 (file)
@@ -236,7 +236,9 @@ sub parseopts {
                if ($dh{DOINDEP} || $dh{DOARCH}) {
                        # User specified that all arch (in)dep package be
                        # built, and there are none of that type.
-                       warning("You asked that all arch in(dep) packages be built, but there are none of that type.");
+                       if (! $dh{BLOCK_NOOP_WARNINGS}) {
+                               warning("You asked that all arch in(dep) packages be built, but there are none of that type.");
+                       }
                        exit(0);
                }
                push @{$dh{DOPACKAGES}},getpackages("both");
@@ -263,7 +265,9 @@ sub parseopts {
        @{$dh{DOPACKAGES}}=@package_list;
 
        if (! defined $dh{DOPACKAGES} || ! @{$dh{DOPACKAGES}}) {
-               warning("No packages to build.");
+               if (! $dh{BLOCK_NOOP_WARNINGS}) {
+                       warning("No packages to build.");
+               }
                exit(0);
        }
 
index 986eb7f4e4f1d638229dda67677d9fc1e956bc89..eab1fb32734e9b442c98a7a619d86cd4cc4223de 100644 (file)
@@ -25,6 +25,8 @@ debhelper (8.1.0) UNRELEASED; urgency=low
   * dh: Add support for build-arch, build-indep, install-arch and
     install-indep sequences. Closes: #604563
     (Thanks, Roger Leigh)
+  * dh_listpackages: Do not display warnings if options cause no packages
+    to be listed.
   
   [ Valery Perrin ]
   * update french translation.
index 8550b565fa7b6a926ef754ed67210945155faef0..109301b9f4c75e84c49623dc24b746ffc4f5a10d 100755 (executable)
@@ -22,6 +22,7 @@ act on if passed the same options.
 
 =cut
 
+$dh{BLOCK_NOOP_WARNINGS}=1;
 init();
 inhibit_log();
 print join("\n",@{$dh{DOPACKAGES}})."\n";