aboutsummaryrefslogtreecommitdiff
path: root/paludis/elike_conditional_dep_spec.cc
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/elike_conditional_dep_spec.cc')
-rw-r--r--paludis/elike_conditional_dep_spec.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/paludis/elike_conditional_dep_spec.cc b/paludis/elike_conditional_dep_spec.cc
index 70cac0f..0898e82 100644
--- a/paludis/elike_conditional_dep_spec.cc
+++ b/paludis/elike_conditional_dep_spec.cc
@@ -23,8 +23,10 @@
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/simple_visitor_cast.hh>
#include <paludis/util/destringify.hh>
+#include <paludis/util/tribool.hh>
#include <paludis/util/log.hh>
#include <paludis/dep_spec.hh>
+#include <paludis/changed_choices.hh>
#include <paludis/name.hh>
#include <paludis/literal_metadata_key.hh>
#include <paludis/environment.hh>
@@ -138,6 +140,18 @@ namespace
return condition_met() || ! icky_use_query_locked(flag, *id, no_warning_for_unlisted);
}
+ virtual bool condition_would_be_met_when(const ChangedChoices & changes) const
+ {
+ Tribool overridden(changes.overridden_value(flag));
+
+ if (overridden.is_indeterminate())
+ return condition_met();
+ else if (! condition_meetable())
+ return condition_met();
+ else
+ return overridden.is_true() ^ inverse;
+ }
+
virtual void need_keys_added() const
{
}