summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
Diffstat (limited to 'cmdline')
-rw-r--r--cmdline/apt-get.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index 4e6cc32de..dd9313bff 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -1679,10 +1679,13 @@ bool DoUpdate(CommandLine &CmdL)
ListUpdate(Stat, *List);
// Rebuild the cache.
- pkgCacheFile::RemoveCaches();
- if (Cache.BuildCaches() == false)
- return false;
-
+ if (_config->FindB("pkgCacheFile::Generate", true) == true)
+ {
+ pkgCacheFile::RemoveCaches();
+ if (Cache.BuildCaches() == false)
+ return false;
+ }
+
return true;
}
/*}}}*/