aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/required_use_verifier.cc
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/repositories/e/required_use_verifier.cc')
-rw-r--r--paludis/repositories/e/required_use_verifier.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/paludis/repositories/e/required_use_verifier.cc b/paludis/repositories/e/required_use_verifier.cc
index 593881cd3..6c55c742d 100644
--- a/paludis/repositories/e/required_use_verifier.cc
+++ b/paludis/repositories/e/required_use_verifier.cc
@@ -176,6 +176,25 @@ RequiredUseVerifier::visit(const RequiredUseSpecTree::NodeType<ExactlyOneDepSpec
}
void
+RequiredUseVerifier::visit(const RequiredUseSpecTree::NodeType<AtMostOneDepSpec>::Type & node)
+{
+ _imp->stack.push_front(Met{0, false});
+ std::for_each(indirect_iterator(node.begin()), indirect_iterator(node.end()), accept_visitor(*this));
+
+ Met met(*_imp->stack.begin());
+ _imp->stack.pop_front();
+
+ if (met.number_met <= 1)
+ ++_imp->stack.begin()->number_met;
+ else if (met.number_met > 1)
+ _imp->stack.begin()->any_unmet = true;
+ else if (met.any_unmet)
+ _imp->stack.begin()->any_unmet = true;
+ else
+ ++_imp->stack.begin()->number_met;
+}
+
+void
RequiredUseVerifier::visit(const RequiredUseSpecTree::NodeType<ConditionalDepSpec>::Type & node)
{
if (! node.spec()->condition_met(_imp->env, _imp->id))