diff options
Diffstat (limited to 'apt-pkg')
-rw-r--r-- | apt-pkg/cachefile.cc | 3 | ||||
-rw-r--r-- | apt-pkg/policy.cc | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/apt-pkg/cachefile.cc b/apt-pkg/cachefile.cc index 0e2192973..b5f32fc29 100644 --- a/apt-pkg/cachefile.cc +++ b/apt-pkg/cachefile.cc @@ -173,6 +173,9 @@ bool pkgCacheFile::BuildPolicy(OpProgress * /*Progress*/) /* */ bool pkgCacheFile::BuildDepCache(OpProgress *Progress) { + if (BuildCaches(Progress, false) == false) + return false; + std::unique_ptr<pkgDepCache> DCache; if (this->DCache != NULL) return true; diff --git a/apt-pkg/policy.cc b/apt-pkg/policy.cc index b36f4d4b7..06c516e53 100644 --- a/apt-pkg/policy.cc +++ b/apt-pkg/policy.cc @@ -414,7 +414,12 @@ bool ReadPinDir(pkgPolicy &Plcy,string Dir) return true; } + _error->PushToStack(); vector<string> const List = GetListOfFilesInDir(Dir, "pref", true, true); + bool const PendingErrors = _error->PendingError(); + _error->MergeWithStack(); + if (PendingErrors) + return false; // Read the files for (vector<string>::const_iterator I = List.begin(); I != List.end(); ++I) |