X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/4e99adb0d3727c0ae41edc9b3f52448d0d5b7655..ca2b6d6dac848ee6c6fdface7b49a4a58470a654:/apt-pkg/deb/deblistparser.cc diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index 258344009..23048008b 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -76,7 +76,7 @@ string debListParser::Package() { std::transform(Result.begin(), Result.end(), Result.begin(), tolower_ascii); 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; } /*}}}*/ @@ -824,10 +824,8 @@ bool debListParser::ParseDepends(pkgCache::VerIterator &Ver, unsigned int Op; Start = ParseDepends(Start, Stop, Package, Version, Op, false, false, false); - if (Start == 0) { - _error->Warning("Problem parsing dependency %zu",static_cast(Key)); // TODO - continue; - } + if (Start == 0) + return _error->Warning("Problem parsing dependency %zu",static_cast(Key)); // TODO size_t const found = Package.rfind(':'); if (found == string::npos) @@ -894,10 +892,8 @@ bool debListParser::ParseProvides(pkgCache::VerIterator &Ver) { Start = ParseDepends(Start,Stop,Package,Version,Op, false, false, false); const size_t archfound = Package.rfind(':'); - if (Start == 0) { - _error->Warning("Problem parsing Provides line"); - continue; - } + if (Start == 0) + return _error->Warning("Problem parsing Provides line"); if (unlikely(Op != pkgCache::Dep::NoOp && Op != pkgCache::Dep::Equals)) { _error->Warning("Ignoring Provides line with non-equal DepCompareOp for package %s", Package.to_string().c_str()); } else if (archfound != string::npos) {