[Aptitude-svn-commit] r4286 - in branches/aptitude-0.3/aptitude: . src

Daniel Burrows dburrows at costa.debian.org
Mon Sep 26 07:13:52 UTC 2005


Author: dburrows
Date: Mon Sep 26 07:13:47 2005
New Revision: 4286

Modified:
   branches/aptitude-0.3/aptitude/ChangeLog
   branches/aptitude-0.3/aptitude/src/main.cc
Log:
Auto-activate quiet mode if stdout is not a tty.

Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog	(original)
+++ branches/aptitude-0.3/aptitude/ChangeLog	Mon Sep 26 07:13:47 2005
@@ -1,5 +1,10 @@
 2005-09-26  Daniel Burrows  <dburrows at debian.org>
 
+	* src/main.cc:
+
+	  Automatically activate quiet mode if stdout is not a terminal.
+	  (Closes: #276767)
+
 	* src/pkg_item.cc:
 
 	  Hang onto the lock while running reportbug.  This obviates the

Modified: branches/aptitude-0.3/aptitude/src/main.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/main.cc	(original)
+++ branches/aptitude-0.3/aptitude/src/main.cc	Mon Sep 26 07:13:47 2005
@@ -345,7 +345,9 @@
 	}
     }
 
-  if(seen_quiet)
+  if(!isatty(1))
+    aptcfg->SetNoUser("quiet", 1);
+  else if(seen_quiet)
     aptcfg->SetNoUser("quiet", quiet);
 
   // Sanity-check



More information about the Aptitude-svn-commit mailing list