diff options
author | David Kalnischkies <david@kalnischkies.de> | 2015-08-22 11:56:38 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2015-08-27 11:27:44 +0200 |
commit | c4171975018eca191426dc1466b61a967e08921f (patch) | |
tree | 05967806ebde47cdf1285297ef4af6f84767836c /apt-pkg/cachefile.cc | |
parent | b6a0018e1c4bb22132e0316a81b7a455c6333cf1 (diff) |
ignore AllowMem parameter in cache generation
The parameter name suggests that it should forbid the building of the
entire cache in memory, but this isn't how it was previously and as
AllowMem is false by default it actually prevents previous usecases from
working like being root and configuring apt to build no caches at all.
This should be fixed at some point to actually work, but that is hard to
pull off as it means switching the default and some callers (including
apt itself) actually did call it explicitly with false in certain
cases for no apparent reason (at least now where it is common to have
enough memory to throw at every problem and even if not is a slow apt
usally better than an apt erroring out).
Closes: 796459
Diffstat (limited to 'apt-pkg/cachefile.cc')
-rw-r--r-- | apt-pkg/cachefile.cc | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/apt-pkg/cachefile.cc b/apt-pkg/cachefile.cc index 214864095..567e0ea9a 100644 --- a/apt-pkg/cachefile.cc +++ b/apt-pkg/cachefile.cc @@ -84,17 +84,14 @@ bool pkgCacheFile::BuildCaches(OpProgress *Progress, bool WithLock) if (WithLock == true) if (_system->Lock() == false) return false; - - if (_config->FindB("Debug::NoLocking",false) == true) - WithLock = false; - + if (_error->PendingError() == true) return false; BuildSourceList(Progress); // Read the caches - bool Res = pkgCacheGenerator::MakeStatusCache(*SrcList,Progress,&Map,!WithLock); + bool Res = pkgCacheGenerator::MakeStatusCache(*SrcList,Progress,&Map, true); if (Progress != NULL) Progress->Done(); if (Res == false) |