aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-11-03 19:53:29 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-11-03 19:53:29 +0000
commit9dfbffe87cfcf9b2153aed406d8aa93989317561 (patch)
tree0d0af3b04a911d31637190b183a08cf2a5c3f870
parent85ed1ea66ef46694ec7d77a101b23245576862d6 (diff)
downloadpaludis-9dfbffe87cfcf9b2153aed406d8aa93989317561.tar.gz
paludis-9dfbffe87cfcf9b2153aed406d8aa93989317561.tar.xz
Make find_installable_id_candidates_for easier to call
-rw-r--r--paludis/resolver/decider.cc16
-rw-r--r--paludis/resolver/decider.hh3
2 files changed, 12 insertions, 7 deletions
diff --git a/paludis/resolver/decider.cc b/paludis/resolver/decider.cc
index aec0d39..96d9304 100644
--- a/paludis/resolver/decider.cc
+++ b/paludis/resolver/decider.cc
@@ -1753,7 +1753,8 @@ Decider::_cannot_decide_for(
if (existing_id)
unsuitable_candidates->push_back(_make_unsuitable_candidate(resolution, existing_id, true));
- const std::shared_ptr<const PackageIDSequence> installable_ids(_find_installable_id_candidates_for(resolution, true, false));
+ const std::shared_ptr<const PackageIDSequence> installable_ids(_find_installable_id_candidates_for(
+ resolution->resolvent().package(), make_slot_filter(resolution->resolvent()), true, false));
for (PackageIDSequence::ConstIterator i(installable_ids->begin()), i_end(installable_ids->end()) ;
i != i_end ; ++i)
unsuitable_candidates->push_back(_make_unsuitable_candidate(resolution, *i, false));
@@ -1821,15 +1822,16 @@ Decider::_installed_ids(const std::shared_ptr<const Resolution> & resolution) co
const std::shared_ptr<const PackageIDSequence>
Decider::_find_installable_id_candidates_for(
- const std::shared_ptr<const Resolution> & resolution,
+ const QualifiedPackageName & package,
+ const Filter & slot_filter,
const bool include_errors,
const bool include_unmaskable) const
{
return (*_imp->env)[selection::AllVersionsSorted(
- _make_origin_filtered_generator(generator::Package(resolution->resolvent().package())) |
- make_slot_filter(resolution->resolvent()) |
+ _make_origin_filtered_generator(generator::Package(package)) |
+ slot_filter |
filter::SupportsAction<InstallAction>() |
- (include_errors ? filter::All() : include_unmaskable ? _make_unmaskable_filter(resolution->resolvent().package()) : filter::NotMasked())
+ (include_errors ? filter::All() : include_unmaskable ? _make_unmaskable_filter(package) : filter::NotMasked())
)];
}
@@ -1838,7 +1840,9 @@ Decider::_find_installable_id_for(const std::shared_ptr<const Resolution> & reso
const bool include_option_changes,
const bool include_unmaskable) const
{
- return _find_id_for_from(resolution, _find_installable_id_candidates_for(resolution, false, include_unmaskable), include_option_changes, false);
+ return _find_id_for_from(resolution, _find_installable_id_candidates_for(
+ resolution->resolvent().package(), make_slot_filter(resolution->resolvent()), false, include_unmaskable),
+ include_option_changes, false);
}
const Decider::FoundID
diff --git a/paludis/resolver/decider.hh b/paludis/resolver/decider.hh
index de740dc..ff0a27c 100644
--- a/paludis/resolver/decider.hh
+++ b/paludis/resolver/decider.hh
@@ -218,7 +218,8 @@ namespace paludis
const std::shared_ptr<const PackageID> _find_existing_id_for(
const std::shared_ptr<const Resolution> &) const;
const std::shared_ptr<const PackageIDSequence> _find_installable_id_candidates_for(
- const std::shared_ptr<const Resolution> &,
+ const QualifiedPackageName &,
+ const Filter &,
const bool include_errors,
const bool include_unmaskable) const;
const FoundID _find_installable_id_for(