]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/deb/deblistparser.cc
Not /not/ immediately mapping a file is INSANE :/.
[apt.git] / apt-pkg / deb / deblistparser.cc
index 25834400911928c03ea2de321e7158db911dc8fb..23048008bdbe6c42ba7439e73154884c2c9599d2 100644 (file)
@@ -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<size_t>(Key)); // TODO
-         continue;
-      }
+      if (Start == 0)
+        return _error->Warning("Problem parsing dependency %zu",static_cast<size_t>(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) {