aboutsummaryrefslogtreecommitdiff
path: root/paludis/resolver/find_replacing_helper.cc
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/resolver/find_replacing_helper.cc')
-rw-r--r--paludis/resolver/find_replacing_helper.cc12
1 files changed, 9 insertions, 3 deletions
diff --git a/paludis/resolver/find_replacing_helper.cc b/paludis/resolver/find_replacing_helper.cc
index 5b9a365ce..dafe3b6bf 100644
--- a/paludis/resolver/find_replacing_helper.cc
+++ b/paludis/resolver/find_replacing_helper.cc
@@ -79,11 +79,17 @@ FindReplacingHelper::operator() (
if (repo->installed_root_key())
{
+ const auto & dest_root = repo->installed_root_key()->parse_value();
+
for (auto r(_imp->env->begin_repositories()), r_end(_imp->env->end_repositories()) ;
r != r_end ; ++r)
- if ((*r)->installed_root_key() &&
- (*r)->installed_root_key()->parse_value() == repo->installed_root_key()->parse_value())
- repos.insert((*r)->name());
+ {
+ const auto repository = *r;
+
+ if (repository->installed_root_key() &&
+ repository->installed_root_key()->parse_value() == dest_root)
+ repos.insert(repository->name());
+ }
}
else
repos.insert(repo->name());