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/pkgcache.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'apt-pkg/pkgcache.cc') diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index 862d05348..6c12b4581 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -530,6 +530,17 @@ bool pkgCache::DepIterator::IsCritical() const return false; } /*}}}*/ +// DepIterator::IsNegative - Returns true if the dep is a negative one /*{{{*/ +// --------------------------------------------------------------------- +/* Some dependencies are positive like Depends and Recommends, others + are negative like Conflicts which can and should be handled differently */ +bool pkgCache::DepIterator::IsNegative() const +{ + return S->Type == Dep::DpkgBreaks || + S->Type == Dep::Conflicts || + S->Type == Dep::Obsoletes; +} + /*}}}*/ // DepIterator::SmartTargetPkg - Resolve dep target pointers w/provides /*{{{*/ // --------------------------------------------------------------------- /* This intellegently looks at dep target packages and tries to figure -- cgit v1.2.3