From 412d5d42faab3dfc59d498ff538a9d5788adeac3 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 22 Nov 2010 19:23:29 -0400 Subject: [PATCH] dh_listpackages: Do not display warnings if options cause no packages to be listed. --- Debian/Debhelper/Dh_Getopt.pm | 8 ++++++-- debian/changelog | 2 ++ dh_listpackages | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Debian/Debhelper/Dh_Getopt.pm b/Debian/Debhelper/Dh_Getopt.pm index 257fe64..e4f3e47 100644 --- a/Debian/Debhelper/Dh_Getopt.pm +++ b/Debian/Debhelper/Dh_Getopt.pm @@ -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); } diff --git a/debian/changelog b/debian/changelog index 986eb7f..eab1fb3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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. diff --git a/dh_listpackages b/dh_listpackages index 8550b56..109301b 100755 --- a/dh_listpackages +++ b/dh_listpackages @@ -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"; -- 2.39.2