aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/virtuals/installed_virtuals_repository.cc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-12-28 19:28:37 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-01-01 03:57:52 +0000
commit092228a814cd6700b97112b5dcf931c80b6b9431 (patch)
tree4e52622c8ee797a645536d642e98e9292fa7b858 /paludis/repositories/virtuals/installed_virtuals_repository.cc
parent97c38fc7c02260a2d213d9a16d878a0410b9d57a (diff)
downloadpaludis-092228a814cd6700b97112b5dcf931c80b6b9431.tar.gz
paludis-092228a814cd6700b97112b5dcf931c80b6b9431.tar.xz
PackageID::repository_name rather than ::repository
Diffstat (limited to 'paludis/repositories/virtuals/installed_virtuals_repository.cc')
-rw-r--r--paludis/repositories/virtuals/installed_virtuals_repository.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/paludis/repositories/virtuals/installed_virtuals_repository.cc b/paludis/repositories/virtuals/installed_virtuals_repository.cc
index 5f72bb8c0..43e73081e 100644
--- a/paludis/repositories/virtuals/installed_virtuals_repository.cc
+++ b/paludis/repositories/virtuals/installed_virtuals_repository.cc
@@ -155,7 +155,7 @@ InstalledVirtualsRepository::need_ids() const
i = _imp->ids.insert(std::make_pair((*p).virtual_name(), std::make_shared<PackageIDSequence>())).first;
std::shared_ptr<const PackageID> id(std::make_shared<virtuals::VirtualsPackageID>(
- _imp->env, shared_from_this(), (*p).virtual_name(), (*p).provided_by(), false));
+ _imp->env, name(), (*p).virtual_name(), (*p).provided_by(), false));
i->second->push_back(id);
}
}
@@ -363,9 +363,10 @@ InstalledVirtualsRepository::repository_factory_dependencies(
}
bool
-InstalledVirtualsRepository::is_suitable_destination_for(const std::shared_ptr<const PackageID> & e) const
+InstalledVirtualsRepository::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->env->package_database()->fetch_repository(id->repository_name()));
+ std::string f(repo->format_key() ? repo->format_key()->value() : "");
return f == "virtuals";
}