diff options
author | David Kalnischkies <david@kalnischkies.de> | 2015-10-25 12:35:00 +0100 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2015-11-04 18:04:03 +0100 |
commit | 2b0660b537581e9e65180e4cf1a94d763fd66847 (patch) | |
tree | f5974711f9fc848100405267917f7dcb06ad1c84 /cmdline/apt-get.cc | |
parent | e7e10e47476606e3b2274cf66b1e8ea74b236757 (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 'cmdline/apt-get.cc')
-rw-r--r-- | cmdline/apt-get.cc | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 1379c607e..2a19360c8 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -595,14 +595,12 @@ static bool DoDownload(CommandLine &CmdL) if (verset.empty() == true) return false; - AcqTextStatus Stat(std::cout, ScreenWidth,_config->FindI("quiet",0)); - pkgAcquire Fetcher(&Stat); - pkgRecords Recs(Cache); pkgSourceList *SrcList = Cache.GetSourceList(); // reuse the usual acquire methods for deb files, but don't drop them into // the usual directories - keep everything in the current directory + aptAcquireWithTextStatus Fetcher; std::vector<std::string> storefile(verset.size()); std::string const cwd = SafeGetCWD(); _config->Set("Dir::Cache::Archives", cwd); @@ -693,10 +691,6 @@ static bool DoSource(CommandLine &CmdL) if (_error->PendingError() == true) return false; - // Create the download object - AcqTextStatus Stat(std::cout, ScreenWidth,_config->FindI("quiet",0)); - pkgAcquire Fetcher(&Stat); - std::unique_ptr<DscFile[]> Dsc(new DscFile[CmdL.FileSize()]); // insert all downloaded uris into this set to avoid downloading them @@ -711,6 +705,7 @@ static bool DoSource(CommandLine &CmdL) bool const dscOnly = _config->FindB("APT::Get::Dsc-Only", false); // Load the requestd sources into the fetcher + aptAcquireWithTextStatus Fetcher; unsigned J = 0; std::vector<std::string> UntrustedList; for (const char **I = CmdL.FileList + 1; *I != 0; I++, J++) @@ -1368,13 +1363,11 @@ static bool DoChangelog(CommandLine &CmdL) CmdL.FileList + 1, APT::CacheSetHelper::CANDIDATE, helper); if (verset.empty() == true) return false; - pkgAcquire Fetcher; - AcqTextStatus Stat(std::cout, ScreenWidth,_config->FindI("quiet",0)); - Fetcher.SetLog(&Stat); bool const downOnly = _config->FindB("APT::Get::Download-Only", false); bool const printOnly = _config->FindB("APT::Get::Print-URIs", false); + aptAcquireWithTextStatus Fetcher; for (APT::VersionList::const_iterator Ver = verset.begin(); Ver != verset.end(); ++Ver) |