diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2012-04-16 23:55:21 +0200 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2012-04-16 23:55:21 +0200 |
commit | 872ed75fec87d7593997467809fcd17dcb88af0c (patch) | |
tree | d6bc6175b9c73cade87bf83153044198d09e1a2f /cmdline | |
parent | 443f5e8a3205162ec6933529c5ca0c95ad3f6941 (diff) |
* cmdline/apt-get.cc:
- if pkgCacheFile::Generate is disabled in 'update' don't
remove the caches (and don't try to open them)
Diffstat (limited to 'cmdline')
-rw-r--r-- | cmdline/apt-get.cc | 11 |
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; } /*}}}*/ |