summaryrefslogtreecommitdiff
path: root/apt-private/private-update.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2015-10-25 12:35:00 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2015-11-04 18:04:03 +0100
commit2b0660b537581e9e65180e4cf1a94d763fd66847 (patch)
treef5974711f9fc848100405267917f7dcb06ad1c84 /apt-private/private-update.cc
parente7e10e47476606e3b2274cf66b1e8ea74b236757 (diff)
new quiet level -qq for apt to hide progress output
-q is for logging and -qqq (old -qq) basically kills every output expect errors, so there should be a way of declaring a middleground in which the output of e.g. 'update' isn't as verbose, but still shows some things. The test framework was actually making use of by accident as it ignored the quiet level in output setup for apt before. Eventually we should figure out some better quiet levels for all tools…
Diffstat (limited to 'apt-private/private-update.cc')
-rw-r--r--apt-private/private-update.cc15
1 files changed, 7 insertions, 8 deletions
diff --git a/apt-private/private-update.cc b/apt-private/private-update.cc
index 1323771f0..1e5d69512 100644
--- a/apt-private/private-update.cc
+++ b/apt-private/private-update.cc
@@ -13,6 +13,7 @@
#include <apt-private/acqprogress.h>
#include <apt-private/private-cachefile.h>
+#include <apt-private/private-download.h>
#include <apt-private/private-output.h>
#include <apt-private/private-update.h>
@@ -37,20 +38,15 @@ bool DoUpdate(CommandLine &CmdL)
return false;
pkgSourceList *List = Cache.GetSourceList();
- // Create the progress
- AcqTextStatus Stat(std::cout, ScreenWidth,_config->FindI("quiet",0));
-
// Just print out the uris an exit if the --print-uris flag was used
if (_config->FindB("APT::Get::Print-URIs") == true)
{
// force a hashsum for compatibility reasons
_config->CndSet("Acquire::ForceHash", "md5sum");
- // get a fetcher
- pkgAcquire Fetcher(&Stat);
-
- // Populate it with the source selection and get all Indexes
+ // Populate it with the source selection and get all Indexes
// (GetAll=true)
+ aptAcquireWithTextStatus Fetcher;
if (List->GetIndexes(&Fetcher,true) == false)
return false;
@@ -70,7 +66,10 @@ bool DoUpdate(CommandLine &CmdL)
// do the work
if (_config->FindB("APT::Get::Download",true) == true)
- ListUpdate(Stat, *List);
+ {
+ AcqTextStatus Stat(std::cout, ScreenWidth,_config->FindI("quiet",0));
+ ListUpdate(Stat, *List);
+ }
// Rebuild the cache.
if (_config->FindB("pkgCacheFile::Generate", true) == true)