aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Danny van Dyk <dvandyk@exherbo.org> 2006-12-24 22:45:49 +0000
committerAvatar Danny van Dyk <dvandyk@exherbo.org> 2006-12-24 22:45:49 +0000
commit99b4ef766712ab455f5a510730b6d248b5c73028 (patch)
tree56a8ca588a5516bd199079de3a2d9a43f3bbbb9c
parent300f516f45c43720caf82aad1a081f0ab559d590 (diff)
downloadpaludis-99b4ef766712ab455f5a510730b6d248b5c73028.tar.gz
paludis-99b4ef766712ab455f5a510730b6d248b5c73028.tar.xz
Fix handling of USE_EXPAND prefixes.
-rw-r--r--paludis/qa/dep_flags_check.cc28
1 files changed, 24 insertions, 4 deletions
diff --git a/paludis/qa/dep_flags_check.cc b/paludis/qa/dep_flags_check.cc
index 04a34de..583592f 100644
--- a/paludis/qa/dep_flags_check.cc
+++ b/paludis/qa/dep_flags_check.cc
@@ -81,12 +81,32 @@ namespace
result << Message(qal_major, "Arch flag '" + stringify(u->flag()) +
"' in " + role);
}
- else if (r->use_interface->use_expand_flags()->count(u->flag()))
+ else
{
+ do
+ {
+ bool found_match(false);
+ UseFlagNameCollection::ConstPointer c(r->use_interface->use_expand_prefixes());
+
+ for (UseFlagNameCollection::Iterator i(c->begin()), i_end(c->end()) ;
+ i != i_end ; ++i)
+ {
+ std::string prefix(stringify(*i)), flag(stringify(u->flag()));
+ if (0 == flag.compare(0, prefix.length(), prefix))
+ {
+ found_match = true;
+ break;
+ }
+ }
+
+ if (found_match)
+ break;
+
+ if (iuse.end() == iuse.find(u->flag()))
+ result << Message(qal_major, "Conditional flag '" + stringify(u->flag()) +
+ "' in " + role + " not in IUSE");
+ } while (false);
}
- else if (iuse.end() == iuse.find(u->flag()))
- result << Message(qal_major, "Conditional flag '" + stringify(u->flag()) +
- "' in " + role + " not in IUSE");
std::for_each(u->begin(), u->end(), accept_visitor(this));
}