aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-07-06 21:39:21 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-07-06 21:39:21 +0100
commitcbd2514b1f8dc8bd8f14030e89355a5c3b4ca0d3 (patch)
tree6eb54261c4ab7aa0570ece4d8752756097c04d17
parent07d0f0df3da11b3e5ad912994c92bcb3bbe5c92f (diff)
downloadpaludis-cbd2514b1f8dc8bd8f14030e89355a5c3b4ca0d3.tar.gz
paludis-cbd2514b1f8dc8bd8f14030e89355a5c3b4ca0d3.tar.xz
Fix implicitness
-rw-r--r--paludis/repositories/e/e_choices_key.cc24
1 files changed, 14 insertions, 10 deletions
diff --git a/paludis/repositories/e/e_choices_key.cc b/paludis/repositories/e/e_choices_key.cc
index 5ea0815..f569cf1 100644
--- a/paludis/repositories/e/e_choices_key.cc
+++ b/paludis/repositories/e/e_choices_key.cc
@@ -245,19 +245,23 @@ namespace
std::map<ChoiceNameWithPrefix, ChoiceOptions>::iterator i(values.find(flag.first));
if (values.end() == i)
values.insert(flag);
- else if (! flag.second.default_value().is_indeterminate())
+ else
{
- if (i->second.default_value().is_indeterminate())
- i->second.default_value() = flag.second.default_value();
- else if (flag.second.default_value().is_true() != i->second.default_value().is_true())
+ i->second.implicit() = i->second.implicit() && flag.second.implicit();
+
+ if (! flag.second.default_value().is_indeterminate())
{
- Log::get_instance()->message("e.iuse_key.contradiction", ll_warning, lc_context)
- << "Flag '" << flag.first << "' is both enabled and disabled by default in "
- << "'" << key->raw_name() << "', using enabled";
- i->second.default_value() = true;
- }
+ if (i->second.default_value().is_indeterminate())
+ i->second.default_value() = flag.second.default_value();
+ else if (flag.second.default_value().is_true() != i->second.default_value().is_true())
+ {
+ Log::get_instance()->message("e.iuse_key.contradiction", ll_warning, lc_context)
+ << "Flag '" << flag.first << "' is both enabled and disabled by default in "
+ << "'" << key->raw_name() << "', using enabled";
+ i->second.default_value() = true;
+ }
- i->second.implicit() = i->second.implicit() && flag.second.implicit();
+ }
}
}
}