summaryrefslogtreecommitdiff
path: root/apt-private
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2017-01-18 11:31:13 +0100
committerJulian Andres Klode <jak@debian.org>2017-02-22 16:53:45 +0100
commit1d017d04c5fdbf71a35e8f154f01bc94305ad798 (patch)
tree8b2e56d34e9fdb4dbd2e5ae85a68d7735adaf020 /apt-private
parentcd67c02330b0c2f47ab4c7c2c1cbc883dacfc453 (diff)
don't show update stats if cache generation is disabled
Unlikely that anyone is actually running into this, but if we asked to not generate a cache and avoid it in the first step we shouldn't create one implicitly anyway by displaying the statistics. (cherry picked from commit 33f982b90a4f77be18cb82daf8c79e9c5513761c)
Diffstat (limited to 'apt-private')
-rw-r--r--apt-private/private-update.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/apt-private/private-update.cc b/apt-private/private-update.cc
index ba953a088..b63b7d963 100644
--- a/apt-private/private-update.cc
+++ b/apt-private/private-update.cc
@@ -71,13 +71,13 @@ bool DoUpdate(CommandLine &CmdL)
ListUpdate(Stat, *List);
}
+ if (_config->FindB("pkgCacheFile::Generate", true) == false)
+ return true;
+
// Rebuild the cache.
- if (_config->FindB("pkgCacheFile::Generate", true) == true)
- {
- pkgCacheFile::RemoveCaches();
- if (Cache.BuildCaches() == false)
- return false;
- }
+ pkgCacheFile::RemoveCaches();
+ if (Cache.BuildCaches() == false)
+ return false;
// show basic stats (if the user whishes)
if (_config->FindB("APT::Cmd::Show-Update-Stats", false) == true)