On Fri, Nov 23, 2007 at 05:53:13PM +0000, James Westby <[EMAIL PROTECTED]> was 
heard to say:
> 
> On Fri, 2007-11-23 at 08:49 -0800, Daniel Burrows wrote:
> > On Tue, Nov 20, 2007 at 10:21:00PM +0000, James Westby <[EMAIL PROTECTED]> 
> > was heard to say:
> > > The following patch from Ubuntu silences the not installing recommends
> > > warning when quiet. Please consider applying it.
> > 
> >   This patch just doesn't do what it says.  Instead of suppressing
> > recommends when quiet, it suppresses them whenever the program is not
> > run in verbose mode.  I'll be happy to suppress that message in quiet
> > mode, though.
> 
> My apologies, I assumed verbose=0 implied quiet. If you would enlighten
> me as to what condition means aptitude is quiet I will happily submit a 
> new patch.

  See the attached patch.  Arguably quietness *should* subtract from
verbosity (so verbose<0 would mean that we're quiet) but that's not how
it works at the moment.  (so yes, you can be both verbose and quiet at
the same time)

  Daniel
diff -r 872138ab2a66 -r bd548a8d1d45 src/cmdline/cmdline_prompt.cc
--- a/src/cmdline/cmdline_prompt.cc	Fri Nov 23 08:51:39 2007 -0800
+++ b/src/cmdline/cmdline_prompt.cc	Fri Nov 23 08:53:02 2007 -0800
@@ -467,6 +467,7 @@ static bool cmdline_show_preview(bool as
 				 bool showvers, bool showdeps, bool showsize,
 				 int verbose)
 {
+  const int quiet = aptcfg->FindI("Quiet", 0);
   bool all_empty=true;
 
   pkgvector lists[num_pkg_action_states];
@@ -545,7 +546,7 @@ static bool cmdline_show_preview(bool as
 	}
     }
 
-  if(!recommended.empty())
+  if(quiet == 0 && !recommended.empty())
     {
       printf(_("The following packages are RECOMMENDED but will NOT be installed:\n"));
       cmdline_show_instinfo(recommended, showvers, showdeps, showsize, false);

Reply via email to