aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-09-25 14:14:22 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-09-25 14:14:22 +0000
commite8531530a91279e96f39709c79e709950b21860e (patch)
tree33b725b778d81a18265c98c82931fba078aa81eb
parent20e7e1c222a2596e716b88318ce838982a9269dd (diff)
downloadpaludis-e8531530a91279e96f39709c79e709950b21860e.tar.gz
paludis-e8531530a91279e96f39709c79e709950b21860e.tar.xz
Don't consider USE=foo when checking USE_EXPAND var foo
-rw-r--r--paludis/default_environment.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/paludis/default_environment.cc b/paludis/default_environment.cc
index 67a85bd..76a3f20 100644
--- a/paludis/default_environment.cc
+++ b/paludis/default_environment.cc
@@ -494,13 +494,15 @@ DefaultEnvironment::known_use_expand_names(const UseFlagName & prefix, const Pac
std::transform(prefix.data().begin(), prefix.data().end(), std::back_inserter(prefix_lower), &::tolower);
for (DefaultConfig::DefaultUseIterator i(DefaultConfig::get_instance()->begin_default_use()),
i_end(DefaultConfig::get_instance()->end_default_use()) ; i != i_end ; ++i)
- if (0 == i->first.data().compare(0, prefix_lower.length(), prefix_lower, 0, prefix_lower.length()))
+ if (i->first.data().length() > prefix_lower.length() &&
+ 0 == i->first.data().compare(0, prefix_lower.length(), prefix_lower, 0, prefix_lower.length()))
result->insert(i->first);
if (pde)
for (DefaultConfig::UseConfigIterator i(DefaultConfig::get_instance()->begin_use_config(pde->name)),
i_end(DefaultConfig::get_instance()->end_use_config(pde->name)) ; i != i_end ; ++i)
- if (0 == i->flag_name.data().compare(0, prefix_lower.length(), prefix_lower, 0, prefix_lower.length()))
+ if (i->flag_name.data().length() > prefix_lower.length() &&
+ 0 == i->flag_name.data().compare(0, prefix_lower.length(), prefix_lower, 0, prefix_lower.length()))
result->insert(i->flag_name);
Log::get_instance()->message(ll_debug, lc_no_context, "DefaultEnvironment::known_use_expand_names("