aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/repository/repository_repository.cc
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/repositories/repository/repository_repository.cc')
-rw-r--r--paludis/repositories/repository/repository_repository.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/paludis/repositories/repository/repository_repository.cc b/paludis/repositories/repository/repository_repository.cc
index feb2e9f32..bfcceb8ad 100644
--- a/paludis/repositories/repository/repository_repository.cc
+++ b/paludis/repositories/repository/repository_repository.cc
@@ -38,6 +38,7 @@
#include <paludis/package_id.hh>
#include <paludis/output_manager.hh>
#include <paludis/environment.hh>
+#include <paludis/package_database.hh>
#include <list>
using namespace paludis;
@@ -345,9 +346,10 @@ RepositoryRepository::sync_host_key() const
}
bool
-RepositoryRepository::is_suitable_destination_for(const std::shared_ptr<const PackageID> & e) const
+RepositoryRepository::is_suitable_destination_for(const std::shared_ptr<const PackageID> & id) const
{
- std::string f(e->repository()->format_key() ? e->repository()->format_key()->value() : "");
+ auto repo(_imp->params.environment()->package_database()->fetch_repository(id->repository_name()));
+ std::string f(repo->format_key() ? repo->format_key()->value() : "");
return f == "unavailable";
}