diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2011-08-22 23:10:15 +0200 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2011-08-22 23:10:15 +0200 |
commit | 8de79b68a834a6cc7abb8976e96ed19374fc02a2 (patch) | |
tree | aead647a6dcafc84404073459e15d5fd603b3c6a /cmdline | |
parent | 95b5f6c19d361745c4e11b214f0f07ad10c9b5b3 (diff) |
remove the caches in 'apt-get update', too, as they will be
invalid in most cases anyway
Diffstat (limited to 'cmdline')
-rw-r--r-- | cmdline/apt-get.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 2dd1c2bce..69b9dcda9 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1625,7 +1625,8 @@ bool DoUpdate(CommandLine &CmdL) if (_config->FindB("APT::Get::Download",true) == true) ListUpdate(Stat, *List); - // Rebuild the cache. + // Rebuild the cache. + pkgCacheFile::RemoveCaches(); if (Cache.BuildCaches() == false) return false; @@ -2227,10 +2228,7 @@ bool DoClean(CommandLine &CmdL) Fetcher.Clean(archivedir); Fetcher.Clean(archivedir + "partial/"); - if (pkgcache.empty() == false && RealFileExists(pkgcache) == true) - unlink(pkgcache.c_str()); - if (srcpkgcache.empty() == false && RealFileExists(srcpkgcache) == true) - unlink(srcpkgcache.c_str()); + pkgCacheFile::RemoveCaches(); return true; } |