summaryrefslogtreecommitdiff
path: root/apt-pkg/depcache.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2011-05-11 14:09:18 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2011-05-11 14:09:18 +0200
commitdf77d8a5fb5340b23fec5363f9a52704e940b048 (patch)
tree1bba838121aa99db9213a939e708464c9a65f38d /apt-pkg/depcache.cc
parentf1bdfe81560b110dbf1ee6f5f7fa8c98423ef345 (diff)
if critical or-group can't be satisfied, exit directly.
Diffstat (limited to 'apt-pkg/depcache.cc')
-rw-r--r--apt-pkg/depcache.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc
index 474313a0d..34ead1726 100644
--- a/apt-pkg/depcache.cc
+++ b/apt-pkg/depcache.cc
@@ -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 */