summaryrefslogtreecommitdiff
path: root/apt-pkg/deb
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2017-01-29 15:01:00 -0800
committerSam Bingner <sam@bingner.com>2019-08-17 12:47:29 -1000
commit54cc69889ed056d93e416fa76c4d6a6b0ed30ebc (patch)
treea3df6779af006394dcf147a59586f588ee43b1b9 /apt-pkg/deb
parentaa376cf54fbf98b7f13f86c2d46e19d6c941876b (diff)
The entire concept of PendingError() is flawed :/.
Diffstat (limited to 'apt-pkg/deb')
-rw-r--r--apt-pkg/deb/debindexfile.cc6
-rw-r--r--apt-pkg/deb/deblistparser.cc2
2 files changed, 4 insertions, 4 deletions
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<pkgCacheListParser> 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<pkgCacheListParser> 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<pkgCacheListParser> 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;
}
/*}}}*/