summaryrefslogtreecommitdiff
path: root/apt-pkg/cachefile.cc
diff options
context:
space:
mode:
authorSam Bingner <sam@bingner.com>2018-12-26 13:07:23 -1000
committerSam Bingner <sam@bingner.com>2018-12-26 14:51:59 -1000
commit59c3e0b998fd69532159d8dc416109cf50651482 (patch)
tree2e58bef1273e4d3542c168980e4a2d793e170045 /apt-pkg/cachefile.cc
parentac0d26d4e39da16bdbf575637fd3d4b24a7fb4b8 (diff)
parent2aa218273eb6009880e987f90d3e24b8efb04642 (diff)
Merge nitotv apt fixes into 1.4.81.4.8+nitotv
Diffstat (limited to 'apt-pkg/cachefile.cc')
-rw-r--r--apt-pkg/cachefile.cc18
1 files changed, 5 insertions, 13 deletions
diff --git a/apt-pkg/cachefile.cc b/apt-pkg/cachefile.cc
index b5f32fc29..90f803ad6 100644
--- a/apt-pkg/cachefile.cc
+++ b/apt-pkg/cachefile.cc
@@ -90,7 +90,7 @@ bool pkgCacheFile::BuildCaches(OpProgress *Progress, bool WithLock)
return false;
Cache.reset(new pkgCache(Map.get()));
if (_error->PendingError() == true)
- return false;
+ return _error->ReturnError();
this->Cache = Cache.release();
this->Map = Map.release();
@@ -102,7 +102,7 @@ bool pkgCacheFile::BuildCaches(OpProgress *Progress, bool WithLock)
return false;
if (_error->PendingError() == true)
- return false;
+ return _error->ReturnError();
if (BuildSourceList(Progress) == false)
return false;
@@ -118,14 +118,8 @@ bool pkgCacheFile::BuildCaches(OpProgress *Progress, bool WithLock)
if (Res == false)
return _error->Error(_("The package lists or status file could not be parsed or opened."));
- /* This sux, remove it someday */
- if (_error->PendingError() == true)
- _error->Warning(_("You may want to run apt-get update to correct these problems"));
-
if (Cache == nullptr)
Cache.reset(new pkgCache(Map.get()));
- if (_error->PendingError() == true)
- return false;
this->Map = Map.release();
this->Cache = Cache.release();
@@ -159,7 +153,7 @@ bool pkgCacheFile::BuildPolicy(OpProgress * /*Progress*/)
Policy.reset(new pkgPolicy(Cache));
if (_error->PendingError() == true)
- return false;
+ return _error->ReturnError();
if (ReadPinFile(*Policy) == false || ReadPinDir(*Policy) == false)
return false;
@@ -185,7 +179,7 @@ bool pkgCacheFile::BuildDepCache(OpProgress *Progress)
DCache.reset(new pkgDepCache(Cache,Policy));
if (_error->PendingError() == true)
- return false;
+ return _error->ReturnError();
if (DCache->Init(Progress) == false)
return false;
@@ -209,8 +203,6 @@ bool pkgCacheFile::Open(OpProgress *Progress, bool WithLock)
if (Progress != NULL)
Progress->Done();
- if (_error->PendingError() == true)
- return false;
return true;
}
@@ -256,7 +248,7 @@ bool pkgCacheFile::AddIndexFile(pkgIndexFile * const File) /*{{{*/
if (_error->PendingError() == true) {
delete Cache;
Cache = nullptr;
- return false;
+ return _error->ReturnError();
}
return true;
}