aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-12-04 14:39:27 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-12-04 14:39:27 +0000
commit484760a15589b8c49a773d95cfa795977b7c8718 (patch)
treeccb2a32628a1bdae88728c5064f50819d8d508f0
parent4f4c68ece8df66eaea5a0e9a9b7a6b70e60c958d (diff)
downloadpaludis-484760a15589b8c49a773d95cfa795977b7c8718.tar.gz
paludis-484760a15589b8c49a773d95cfa795977b7c8718.tar.xz
Fix sync_host
Fixes: ticket:1054
-rw-r--r--paludis/repositories/e/e_repository.cc6
-rw-r--r--paludis/repositories/unavailable/unavailable_repository.cc5
2 files changed, 9 insertions, 2 deletions
diff --git a/paludis/repositories/e/e_repository.cc b/paludis/repositories/e/e_repository.cc
index 22269fa..29c9be8 100644
--- a/paludis/repositories/e/e_repository.cc
+++ b/paludis/repositories/e/e_repository.cc
@@ -365,7 +365,7 @@ namespace paludis
make_binary_keywords_filter(params.binary_keywords_filter()))),
accounts_repository_data_location_key(layout->accounts_repository_data_location_key()),
e_updates_location_key(layout->e_updates_location_key()),
- sync_hosts(params.sync()),
+ sync_hosts(std::make_shared<Map<std::string, std::string> >()),
sync_host_key(std::make_shared<LiteralMetadataStringStringMapKey>("sync_host", "sync_host", mkt_internal, sync_hosts)),
eclass_mtimes(std::make_shared<EclassMtimes>(r, params.eclassdirs())),
master_mtime(0)
@@ -396,6 +396,10 @@ namespace paludis
FSStat mtfs(mtf.stat());
if (mtfs.exists())
master_mtime = mtfs.mtim().seconds();
+
+ for (auto i(params.sync()->begin()), i_end(params.sync()->end()) ;
+ i != i_end ; ++i)
+ sync_hosts->insert(i->first, extract_host_from_url(i->second));
}
Imp<ERepository>::~Imp()
diff --git a/paludis/repositories/unavailable/unavailable_repository.cc b/paludis/repositories/unavailable/unavailable_repository.cc
index d3ea7e8..b4905a6 100644
--- a/paludis/repositories/unavailable/unavailable_repository.cc
+++ b/paludis/repositories/unavailable/unavailable_repository.cc
@@ -73,11 +73,14 @@ namespace paludis
"sync", "sync", mkt_normal, params.sync())),
sync_options_key(std::make_shared<LiteralMetadataStringStringMapKey>(
"sync_options", "sync_options", mkt_normal, params.sync_options())),
- sync_hosts(params.sync()),
+ sync_hosts(std::make_shared<Map<std::string, std::string> >()),
sync_host_key(std::make_shared<LiteralMetadataStringStringMapKey>("sync_host", "sync_host", mkt_internal, sync_hosts)),
store(DeferredConstructionPtr<std::shared_ptr<UnavailableRepositoryStore> > (
std::bind(&make_store, repo, std::cref(params))))
{
+ for (auto i(params.sync()->begin()), i_end(params.sync()->end()) ;
+ i != i_end ; ++i)
+ sync_hosts->insert(i->first, extract_host_from_url(i->second));
}
};
}