summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgcache.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/pkgcache.cc
parentf1bdfe81560b110dbf1ee6f5f7fa8c98423ef345 (diff)
if critical or-group can't be satisfied, exit directly.
Diffstat (limited to 'apt-pkg/pkgcache.cc')
-rw-r--r--apt-pkg/pkgcache.cc11
1 files changed, 11 insertions, 0 deletions
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