From 54cc69889ed056d93e416fa76c4d6a6b0ed30ebc Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Sun, 29 Jan 2017 15:01:00 -0800 Subject: The entire concept of PendingError() is flawed :/. --- apt-pkg/deb/debindexfile.cc | 6 +++--- apt-pkg/deb/deblistparser.cc | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'apt-pkg/deb') diff --git a/apt-pkg/deb/debindexfile.cc b/apt-pkg/deb/debindexfile.cc index 25e0a3312..78e3eecb7 100644 --- a/apt-pkg/deb/debindexfile.cc +++ b/apt-pkg/deb/debindexfile.cc @@ -130,7 +130,7 @@ pkgCacheListParser * debTranslationsIndex::CreateListParser(FileFd &Pkg) std::unique_ptr Parser(new debTranslationsParser(&Pkg)); bool const newError = _error->PendingError(); _error->MergeWithStack(); - return newError ? nullptr : Parser.release(); + return newError ? ((void)_error->ReturnError(), nullptr) : Parser.release(); } /*}}}*/ // dpkg/status Index /*{{{*/ @@ -158,7 +158,7 @@ pkgCacheListParser * debStatusIndex::CreateListParser(FileFd &Pkg) std::unique_ptr Parser(new debStatusListParser(&Pkg)); bool const newError = _error->PendingError(); _error->MergeWithStack(); - return newError ? nullptr : Parser.release(); + return newError ? ((void)_error->ReturnError(), nullptr) : Parser.release(); } /*}}}*/ // DebPkgFile Index - a single .deb file as an index /*{{{*/ @@ -228,7 +228,7 @@ pkgCacheListParser * debDebPkgFileIndex::CreateListParser(FileFd &Pkg) std::unique_ptr Parser(new debDebFileParser(&Pkg, DebFile)); bool const newError = _error->PendingError(); _error->MergeWithStack(); - return newError ? nullptr : Parser.release(); + return newError ? ((void)_error->ReturnError(), nullptr) : Parser.release(); } uint8_t debDebPkgFileIndex::GetIndexFlags() const { diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index 68c3498c8..b737a9207 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -86,7 +86,7 @@ string debListParser::Package() { } if(unlikely(Result.empty() == true)) - _error->Error("Encountered a section with no Package: header"); + _error->Warning("Encountered a section with no Package: header"); return Result; } /*}}}*/ -- cgit v1.2.3