[Aptitude-svn-commit] r4266 - in branches/aptitude-0.3/aptitude: .
doc/en src
Daniel Burrows
dburrows at costa.debian.org
Mon Sep 26 04:01:34 UTC 2005
Author: dburrows
Date: Mon Sep 26 04:01:30 2005
New Revision: 4266
Modified:
branches/aptitude-0.3/aptitude/ChangeLog
branches/aptitude-0.3/aptitude/doc/en/aptitude.xml
branches/aptitude-0.3/aptitude/doc/en/manpage.xml
branches/aptitude-0.3/aptitude/src/main.cc
Log:
Add basic support for a 'quiet' option.
Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog (original)
+++ branches/aptitude-0.3/aptitude/ChangeLog Mon Sep 26 04:01:30 2005
@@ -1,5 +1,10 @@
2005-09-25 Daniel Burrows <dburrows at debian.org>
+ * doc/en/aptitude.xml, doc/en/manpage.xml, src/main.cc:
+
+ Add basic support for a 'quiet' option; it needs to be
+ integrated into all cmdline files.
+
* doc/en/aptitude.xml:
Explicitly note that ~a matches the *current state* of a
Modified: branches/aptitude-0.3/aptitude/doc/en/aptitude.xml
==============================================================================
--- branches/aptitude-0.3/aptitude/doc/en/aptitude.xml (original)
+++ branches/aptitude-0.3/aptitude/doc/en/aptitude.xml Mon Sep 26 04:01:30 2005
@@ -8548,6 +8548,18 @@
information.
</seg>
</seglistitem>
+
+ <seglistitem id='configQuiet'>
+ <seg><literal>Quiet</literal></seg>
+
+ <seg><literal>0</literal></seg>
+
+ <seg>
+ This controls the quietness of the command-line mode.
+ Setting it to a higher value will disable more
+ progress indicators.
+ </seg>
+ </seglistitem>
</segmentedlist>
</section>
</section>
Modified: branches/aptitude-0.3/aptitude/doc/en/manpage.xml
==============================================================================
--- branches/aptitude-0.3/aptitude/doc/en/manpage.xml (original)
+++ branches/aptitude-0.3/aptitude/doc/en/manpage.xml Mon Sep 26 04:01:30 2005
@@ -822,6 +822,18 @@
</varlistentry>
<varlistentry>
+ <term><literal>-q</literal>, <literal>--quiet</literal></term>
+
+ <listitem>
+ Suppress all incremental progress indicators, thus making
+ the output loggable. This may be supplied multiple times to
+ make the program quieter, but unlike &apt-get;, &aptitude;
+ does not enable <literal>-y</literal> when
+ <literal>-q</literal> is supplied more than once.
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><literal>-V</literal>, <literal>--show-versions</literal></term>
<listitem>
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 04:01:30 2005
@@ -152,6 +152,7 @@
printf(_(" -Z Show the change in installed size of each package.\n"));
printf(_(" -v Display extra information. (may be supplied multiple times)\n"));
printf(_(" -t [release] Set the release from which packages should be installed\n"));
+ printf(_(" -q In command-line mode, suppress the incremental progress indicators."));
printf(_(" -o key=val Directly set the configuration option named 'key'\n"));
printf(_(" --with(out)-recommends Specify whether or not to treat recommends as\n strong dependencies\n"));
printf(_(" -S fname: Read the aptitude extended status info from fname.\n"));
@@ -220,6 +221,8 @@
bool visual_preview=aptcfg->FindB(PACKAGE "::CmdLine::Visual-Preview", false);
bool always_prompt=aptcfg->FindB(PACKAGE "::CmdLine::Always-Prompt", false);
int verbose=aptcfg->FindI(PACKAGE "::CmdLine::Verbose", 0);
+ bool seen_quiet = false;
+ int quiet = 0;
int curopt;
// The last option seen
@@ -229,7 +232,7 @@
argv0=argv[0];
// Read the arguments:
- while((curopt=getopt_long(argc, argv, "DVZvhS:uiF:w:sO:fdyPt:Rro:", opts, NULL))!=-1)
+ while((curopt=getopt_long(argc, argv, "DVZvhS:uiF:w:sO:fdyPt:qRro:", opts, NULL))!=-1)
{
switch(curopt)
{
@@ -266,6 +269,10 @@
case 'y':
assume_yes=true;
break;
+ case 'q':
+ ++quiet;
+ seen_quiet = true;
+ break;
case 'r':
aptcfg->SetNoUser(PACKAGE "::Recommends-Important", "true");
break;
@@ -338,6 +345,9 @@
}
}
+ if(seen_quiet)
+ aptcfg->SetNoUser("quiet", quiet);
+
// Sanity-check
if(update_only && install_only)
{
More information about the Aptitude-svn-commit
mailing list