]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/depcache.cc
if critical or-group can't be satisfied, exit directly.
[apt.git] / apt-pkg / depcache.cc
index 474313a0d386d565388b6c6b5896353ce81575f4..34ead1726cc3665f145a70f85d73e305aa1d31b5 100644 (file)
@@ -1145,8 +1145,18 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst,
       
       /* If we are in an or group locate the first or that can 
          succeed. We have already cached this.. */
-      for (; Ors > 1 && (DepState[Start->ID] & DepCVer) != DepCVer; Ors--)
-        Start++;
+      for (; Ors > 1 && (DepState[Start->ID] & DepCVer) != DepCVer; --Ors)
+        ++Start;
+      if (Ors == 1 && (DepState[Start->ID] &DepCVer) != DepCVer && Start.IsNegative() == false)
+      {
+        if(DebugAutoInstall == true)
+           std::clog << OutputInDepth(Depth) << Start << " can't be satisfied!" << std::endl;
+        if (Start.IsCritical() == false)
+           continue;
+        // if the dependency was critical, we can't install it, so remove it again
+        MarkDelete(Pkg,false,Depth + 1, false);
+        return;
+      }
 
       /* This bit is for processing the possibilty of an install/upgrade
          fixing the problem */