summaryrefslogtreecommitdiff
path: root/apt-pkg/cachefile.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-01-26 15:51:45 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2010-01-26 15:51:45 +0100
commit51f9f4d78deabf54dbbb6881139d2b1a319ffbfc (patch)
tree60a2bcd8911acd5c4ab8b4558bfd30344b673ff5 /apt-pkg/cachefile.cc
parent76fe5db7153957f8fda437e3bd614312b076f19e (diff)
parentc1f168f54be5b4babeb9b91cd7145441ea2489ad (diff)
merge from the mvo branch
Diffstat (limited to 'apt-pkg/cachefile.cc')
-rw-r--r--apt-pkg/cachefile.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/apt-pkg/cachefile.cc b/apt-pkg/cachefile.cc
index 1a84aea54..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,7 +92,8 @@ bool pkgCacheFile::Open(OpProgress &Progress,bool WithLock)
Policy = new pkgPolicy(Cache);
if (_error->PendingError() == true)
return false;
- if (ReadPinFile(*Policy) == false)
+
+ if (ReadPinFile(*Policy) == false || ReadPinDir(*Policy) == false)
return false;
// Create the dependency cache
@@ -108,8 +109,6 @@ bool pkgCacheFile::Open(OpProgress &Progress,bool WithLock)
return true;
}
/*}}}*/
-
-
// CacheFile::Close - close the cache files /*{{{*/
// ---------------------------------------------------------------------
/* */