aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-07-14 03:06:48 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-07-14 03:14:00 +0100
commit56ce29592f7c244795f20e0b99987f1854da01ea (patch)
tree64eacd48a2c2b06845ccb73c06eb5879c7d99a51
parentb3e1304b97c130f1b470627eeaee5abbe714cc3b (diff)
downloadpaludis-56ce29592f7c244795f20e0b99987f1854da01ea.tar.gz
paludis-56ce29592f7c244795f20e0b99987f1854da01ea.tar.xz
Update E info handling for previous (continued)
-rw-r--r--paludis/repositories/e/e_installed_repository.cc30
1 files changed, 19 insertions, 11 deletions
diff --git a/paludis/repositories/e/e_installed_repository.cc b/paludis/repositories/e/e_installed_repository.cc
index 0b5357a..4c0c5a2 100644
--- a/paludis/repositories/e/e_installed_repository.cc
+++ b/paludis/repositories/e/e_installed_repository.cc
@@ -409,20 +409,28 @@ EInstalledRepository::perform_info(const std::tr1::shared_ptr<const ERepositoryI
/* try to find an info_vars file from the original repo */
std::tr1::shared_ptr<const Set<std::string> > i;
- if (id->source_origin_key())
+ if (id->from_repositories_key())
{
- RepositoryName rn(id->source_origin_key()->value());
- if (_imp->params.environment->package_database()->has_repository_named(rn))
+ for (Set<std::string>::ConstIterator o(id->from_repositories_key()->value()->begin()),
+ o_end(id->from_repositories_key()->value()->end()) ;
+ o != o_end ; ++o)
{
- const std::tr1::shared_ptr<const Repository> r(
- _imp->params.environment->package_database()->fetch_repository(rn));
- Repository::MetadataConstIterator m(r->find_metadata("info_vars"));
- if (r->end_metadata() != m)
+ RepositoryName rn(*o);
+ if (_imp->params.environment->package_database()->has_repository_named(rn))
{
- const MetadataCollectionKey<Set<std::string> > * const mm(
- visitor_cast<const MetadataCollectionKey<Set<std::string> > >(**m));
- if (mm)
- i = mm->value();
+ const std::tr1::shared_ptr<const Repository> r(
+ _imp->params.environment->package_database()->fetch_repository(rn));
+ Repository::MetadataConstIterator m(r->find_metadata("info_vars"));
+ if (r->end_metadata() != m)
+ {
+ const MetadataCollectionKey<Set<std::string> > * const mm(
+ visitor_cast<const MetadataCollectionKey<Set<std::string> > >(**m));
+ if (mm)
+ {
+ i = mm->value();
+ break;
+ }
+ }
}
}
}