diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2009-07-21 18:31:36 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2009-07-21 18:31:36 +0200 |
commit | d59725349555939d39af81cf7746069d6aa3536c (patch) | |
tree | 90a85a3e4ffef76d9572ecf4a1dc8323f7ea38c9 /apt-pkg/cachefile.cc | |
parent | 02e8ba352f71b82a936f5034059251425ab183d5 (diff) | |
parent | c5f44afc2446d738e30ea4c6021d4b60915546b1 (diff) |
The 'not dead yet' release
* add hook for MarkInstall and MarkDelete (closes: #470035)
* add the various foldmarkers in apt-pkg & cmdline (no code change)
* versions with a pin of -1 shouldn't be a candidate (Closes: #355237)
* prefer mmap as memory allocator in MMap instead of a static char
array which can (at least in theory) grow dynamic
* eliminate (hopefully all) segfaults in pkgcachegen.cc and mmap.cc
which can arise if cache doesn't fit into the mmap (Closes: #535218)
* display warnings instead of errors if the parts dirs doesn't exist
* honor the dpkg hold state in new Marker hooks (closes: #64141)
Diffstat (limited to 'apt-pkg/cachefile.cc')
-rw-r--r-- | apt-pkg/cachefile.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/apt-pkg/cachefile.cc b/apt-pkg/cachefile.cc index 5b5e26497..790312dc8 100644 --- a/apt-pkg/cachefile.cc +++ b/apt-pkg/cachefile.cc @@ -24,7 +24,6 @@ #include <apti18n.h> /*}}}*/ - // CacheFile::CacheFile - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ @@ -49,6 +48,7 @@ pkgCacheFile::~pkgCacheFile() /* */ bool pkgCacheFile::BuildCaches(OpProgress &Progress,bool WithLock) { + const bool ErrorWasEmpty = _error->empty(); if (WithLock == true) if (_system->Lock() == false) return false; @@ -71,7 +71,7 @@ bool pkgCacheFile::BuildCaches(OpProgress &Progress,bool WithLock) return _error->Error(_("The package lists or status file could not be parsed or opened.")); /* This sux, remove it someday */ - if (_error->empty() == false) + if (ErrorWasEmpty == true && _error->empty() == false) _error->Warning(_("You may want to run apt-get update to correct these problems")); Cache = new pkgCache(Map); @@ -92,6 +92,7 @@ bool pkgCacheFile::Open(OpProgress &Progress,bool WithLock) Policy = new pkgPolicy(Cache); if (_error->PendingError() == true) return false; + if (ReadPinFile(*Policy) == false || ReadPinDir(*Policy) == false) return false; @@ -108,8 +109,6 @@ bool pkgCacheFile::Open(OpProgress &Progress,bool WithLock) return true; } /*}}}*/ - - // CacheFile::Close - close the cache files /*{{{*/ // --------------------------------------------------------------------- /* */ |