aboutsummaryrefslogtreecommitdiff
path: root/src/clients/cave/resolve_common.cc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-12-19 18:29:22 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-12-19 18:29:22 +0000
commitd83965fef9cb945a2dd42fc17d709fbfac1ce0fe (patch)
tree3bb396aa30273068f0eedd1821c9fd1db0a61403 /src/clients/cave/resolve_common.cc
parent9418c6b546001af699ff4d9d3c9e5451be0a2125 (diff)
downloadpaludis-d83965fef9cb945a2dd42fc17d709fbfac1ce0fe.tar.gz
paludis-d83965fef9cb945a2dd42fc17d709fbfac1ce0fe.tar.xz
Support group names for suggestions
Diffstat (limited to 'src/clients/cave/resolve_common.cc')
-rw-r--r--src/clients/cave/resolve_common.cc42
1 files changed, 40 insertions, 2 deletions
diff --git a/src/clients/cave/resolve_common.cc b/src/clients/cave/resolve_common.cc
index 6ff20f44e..e554495be 100644
--- a/src/clients/cave/resolve_common.cc
+++ b/src/clients/cave/resolve_common.cc
@@ -933,7 +933,26 @@ paludis::cave::resolve_common(
for (args::StringSetArg::ConstIterator i(resolution_options.a_take.begin_args()),
i_end(resolution_options.a_take.end_args()) ;
i != i_end ; ++i)
- interest_in_spec_helper.add_take_spec(parse_user_package_dep_spec(*i, env.get(), { updso_allow_wildcards }));
+ {
+ bool might_be_group(std::string::npos == i->find_first_not_of(
+ "abcdefghijklmnopqrstuvwxyz"
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ "0123456789-_"));
+
+ if (might_be_group)
+ {
+ interest_in_spec_helper.add_take_group(*i);
+ try
+ {
+ interest_in_spec_helper.add_take_spec(parse_user_package_dep_spec(*i, env.get(), { updso_allow_wildcards }));
+ }
+ catch (const Exception &)
+ {
+ }
+ }
+ else
+ interest_in_spec_helper.add_take_spec(parse_user_package_dep_spec(*i, env.get(), { updso_allow_wildcards }));
+ }
for (args::StringSetArg::ConstIterator i(resolution_options.a_take_from.begin_args()),
i_end(resolution_options.a_take_from.end_args()) ;
@@ -943,7 +962,26 @@ paludis::cave::resolve_common(
for (args::StringSetArg::ConstIterator i(resolution_options.a_ignore.begin_args()),
i_end(resolution_options.a_ignore.end_args()) ;
i != i_end ; ++i)
- interest_in_spec_helper.add_ignore_spec(parse_user_package_dep_spec(*i, env.get(), { updso_allow_wildcards }));
+ {
+ bool might_be_group(std::string::npos == i->find_first_not_of(
+ "abcdefghijklmnopqrstuvwxyz"
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ "0123456789-_"));
+
+ if (might_be_group)
+ {
+ interest_in_spec_helper.add_ignore_group(*i);
+ try
+ {
+ interest_in_spec_helper.add_ignore_spec(parse_user_package_dep_spec(*i, env.get(), { updso_allow_wildcards }));
+ }
+ catch (const Exception &)
+ {
+ }
+ }
+ else
+ interest_in_spec_helper.add_ignore_spec(parse_user_package_dep_spec(*i, env.get(), { updso_allow_wildcards }));
+ }
for (args::StringSetArg::ConstIterator i(resolution_options.a_ignore_from.begin_args()),
i_end(resolution_options.a_ignore_from.end_args()) ;