aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Diego Pettenò <flameeyes@gentoo.org> 2006-03-08 11:30:11 +0000
committerAvatar Diego Pettenò <flameeyes@gentoo.org> 2006-03-08 11:30:11 +0000
commit40dde168b4ffe05470e09a71bd13cb722df4fb6b (patch)
treee9204650b0a8a0565cabc7b9fd0977c604ced396
parent4edc5c3d5df629d139d8b7121eef9033cc8b75a4 (diff)
downloadpaludis-40dde168b4ffe05470e09a71bd13cb722df4fb6b.tar.gz
paludis-40dde168b4ffe05470e09a71bd13cb722df4fb6b.tar.xz
Implemente Deprecated IUSE blacklisting as a set, and add oggvorbis to that.
-rw-r--r--paludis/qa/iuse_check.cc19
1 files changed, 15 insertions, 4 deletions
diff --git a/paludis/qa/iuse_check.cc b/paludis/qa/iuse_check.cc
index c066096..73b800a 100644
--- a/paludis/qa/iuse_check.cc
+++ b/paludis/qa/iuse_check.cc
@@ -44,11 +44,22 @@ IuseCheck::operator() (const EbuildCheckData & e) const
{
std::set<UseFlagName> iuse(metadata->begin_iuse(), metadata->end_iuse());
- if (iuse.end() != iuse.find(UseFlagName("gtk2")))
- result << Message(qal_minor, "Deprecated USE flag 'gtk2'");
+ static std::set<UseFlagName> iuse_blacklist;
+ if (iuse_blacklist.empty())
+ {
+ iuse_blacklist.insert(UseFlagName("gtk2"));
+ iuse_blacklist.insert(UseFlagName("xml2"));
+ iuse_blacklist.insert(UseFlagName("oggvorbis"));
+ }
- if (iuse.end() != iuse.find(UseFlagName("xml2")))
- result << Message(qal_minor, "Deprecated USE flag 'xml2'");
+ std::set<UseFlagName> bad_iuse;
+ std::set_intersection(iuse.begin(), iuse.end(),
+ iuse_blacklist.begin(), iuse_blacklist.end(),
+ std::inserter(bad_iuse, bad_iuse.begin()));
+
+ if (! bad_iuse.empty())
+ result << Message(qal_minor, "Deprecated IUSEs '" + join(bad_iuse.begin(),
+ bad_iuse.end(), "', '") + "'");
}
catch (const NameError & e)
{