summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/cachefile.cc3
-rw-r--r--apt-pkg/policy.cc5
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 eb90daca7..2bdd96d8c 100644
--- a/apt-pkg/policy.cc
+++ b/apt-pkg/policy.cc
@@ -316,7 +316,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)