From df77d8a5fb5340b23fec5363f9a52704e940b048 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 11 May 2011 14:09:18 +0200 Subject: if critical or-group can't be satisfied, exit directly. --- apt-pkg/depcache.cc | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'apt-pkg/depcache.cc') 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 */ -- cgit v1.2.3