aboutsummaryrefslogtreecommitdiff
path: root/src/clients/cave/resolve_common.cc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2012-07-27 20:02:26 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2012-07-27 21:28:11 +0100
commit426a01ee4256e2c8fc9135a43a156846a6d593cc (patch)
tree6891265629214a4822008c12151252682bf799c0 /src/clients/cave/resolve_common.cc
parentccbd7c2b7cfb276c26dc3b0174f0ffaedee25529 (diff)
downloadpaludis-426a01ee4256e2c8fc9135a43a156846a6d593cc.tar.gz
paludis-426a01ee4256e2c8fc9135a43a156846a6d593cc.tar.xz
cave resolve --prefer-matching / --avoid-matching
Diffstat (limited to 'src/clients/cave/resolve_common.cc')
-rw-r--r--src/clients/cave/resolve_common.cc12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/clients/cave/resolve_common.cc b/src/clients/cave/resolve_common.cc
index 3ddbddb33..00e4c1ce1 100644
--- a/src/clients/cave/resolve_common.cc
+++ b/src/clients/cave/resolve_common.cc
@@ -964,10 +964,16 @@ paludis::cave::resolve_common(
i_end(resolution_options.a_favour.end_args()) ;
i != i_end ; ++i)
prefer_or_avoid_helper.add_prefer_name(disambiguate_if_necessary(env.get(), *i));
- for (args::StringSetArg::ConstIterator i(resolution_options.a_avoid.begin_args()),
- i_end(resolution_options.a_avoid.end_args()) ;
+ for (args::StringSetArg::ConstIterator i(resolution_options.a_favour_matching.begin_args()),
+ i_end(resolution_options.a_favour_matching.end_args()) ;
i != i_end ; ++i)
- prefer_or_avoid_helper.add_avoid_name(disambiguate_if_necessary(env.get(), *i));
+ prefer_or_avoid_helper.add_prefer_matching((*env)[selection::AllVersionsUnsorted(generator::Matches(
+ parse_spec_with_nice_error(*i, env.get(), { }, filter::All()), make_null_shared_ptr(), { }))]);
+ for (args::StringSetArg::ConstIterator i(resolution_options.a_avoid_matching.begin_args()),
+ i_end(resolution_options.a_avoid_matching.end_args()) ;
+ i != i_end ; ++i)
+ prefer_or_avoid_helper.add_avoid_matching((*env)[selection::AllVersionsUnsorted(generator::Matches(
+ parse_spec_with_nice_error(*i, env.get(), { }, filter::All()), make_null_shared_ptr(), { }))]);
RemoveIfDependentHelper remove_if_dependent_helper(env.get());
for (args::StringSetArg::ConstIterator i(resolution_options.a_remove_if_dependent.begin_args()),