summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2011-08-22 23:10:15 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2011-08-22 23:10:15 +0200
commit8de79b68a834a6cc7abb8976e96ed19374fc02a2 (patch)
treeaead647a6dcafc84404073459e15d5fd603b3c6a /cmdline
parent95b5f6c19d361745c4e11b214f0f07ad10c9b5b3 (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.cc8
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;
}