From 8de79b68a834a6cc7abb8976e96ed19374fc02a2 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 22 Aug 2011 23:10:15 +0200 Subject: remove the caches in 'apt-get update', too, as they will be invalid in most cases anyway --- cmdline/apt-get.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'cmdline') 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; } -- cgit v1.2.3