aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--paludis/resolver/interest_in_spec_helper.cc22
1 files changed, 11 insertions, 11 deletions
diff --git a/paludis/resolver/interest_in_spec_helper.cc b/paludis/resolver/interest_in_spec_helper.cc
index 4df3f74af..e34cf502e 100644
--- a/paludis/resolver/interest_in_spec_helper.cc
+++ b/paludis/resolver/interest_in_spec_helper.cc
@@ -312,6 +312,17 @@ InterestInSpecHelper::operator() (
if ((! spec_group.empty()) && _imp->ignore_groups.end() != _imp->ignore_groups.find(spec_group))
return si_ignore;
+ /* we also take suggestions and recommendations that have already been installed */
+ if (dep.spec().if_package())
+ {
+ const std::shared_ptr<const PackageIDSequence> installed_ids(
+ (*_imp->env)[selection::SomeArbitraryVersion(
+ generator::Matches(*dep.spec().if_package(), dep.from_id(), { }) |
+ filter::InstalledAtRoot(_imp->env->system_root_key()->parse_value()))]);
+ if (! installed_ids->empty())
+ return si_take;
+ }
+
if (dep.spec().if_package() && (suggestion || recommendation))
{
auto e(_imp->env->interest_in_suggestion(id, *dep.spec().if_package()));
@@ -337,17 +348,6 @@ InterestInSpecHelper::operator() (
return si_ignore;
}
- /* we also take suggestions and recommendations that have already been installed */
- if (dep.spec().if_package())
- {
- const std::shared_ptr<const PackageIDSequence> installed_ids(
- (*_imp->env)[selection::SomeArbitraryVersion(
- generator::Matches(*dep.spec().if_package(), dep.from_id(), { }) |
- filter::InstalledAtRoot(_imp->env->system_root_key()->parse_value()))]);
- if (! installed_ids->empty())
- return si_take;
- }
-
return si_untaken;
}
else