aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/unwritten/unwritten_repository.cc
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/repositories/unwritten/unwritten_repository.cc')
-rw-r--r--paludis/repositories/unwritten/unwritten_repository.cc15
1 files changed, 10 insertions, 5 deletions
diff --git a/paludis/repositories/unwritten/unwritten_repository.cc b/paludis/repositories/unwritten/unwritten_repository.cc
index 341fa5bd7..a9247aa67 100644
--- a/paludis/repositories/unwritten/unwritten_repository.cc
+++ b/paludis/repositories/unwritten/unwritten_repository.cc
@@ -56,7 +56,8 @@ namespace paludis
const std::shared_ptr<LiteralMetadataValueKey<FSPath> > location_key;
const std::shared_ptr<LiteralMetadataValueKey<std::string> > sync_key;
const std::shared_ptr<LiteralMetadataValueKey<std::string> > sync_options_key;
- const std::shared_ptr<LiteralMetadataValueKey<std::string> > sync_host_key;
+ const std::shared_ptr<Map<std::string, std::string> > sync_hosts;
+ const std::shared_ptr<LiteralMetadataStringStringMapKey> sync_host_key;
const ActiveObjectPtr<DeferredConstructionPtr<
std::shared_ptr<UnwrittenRepositoryStore> > > store;
@@ -71,10 +72,12 @@ namespace paludis
"sync", "sync", mkt_normal, params.sync())),
sync_options_key(std::make_shared<LiteralMetadataValueKey<std::string> >(
"sync_options", "sync_options", mkt_normal, params.sync_options())),
- sync_host_key(std::make_shared<LiteralMetadataValueKey<std::string> >("sync_host", "sync_host", mkt_internal, extract_host_from_url(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<UnwrittenRepositoryStore> > (
std::bind(&make_store, repo, std::cref(params))))
{
+ sync_hosts->insert("", extract_host_from_url(params.sync()));
}
};
}
@@ -261,11 +264,13 @@ UnwrittenRepository::some_ids_might_not_be_masked() const
}
bool
-UnwrittenRepository::sync(const std::shared_ptr<OutputManager> & output_manager) const
+UnwrittenRepository::sync(
+ const std::string & suffix,
+ const std::shared_ptr<OutputManager> & output_manager) const
{
Context context("When syncing repository '" + stringify(name()) + "':");
- if (_imp->params.sync().empty())
+ if (_imp->params.sync().empty() || ! suffix.empty())
return false;
std::list<std::string> sync_list;
@@ -372,7 +377,7 @@ UnwrittenRepository::accept_keywords_key() const
return make_null_shared_ptr();
}
-const std::shared_ptr<const MetadataValueKey<std::string> >
+const std::shared_ptr<const MetadataCollectionKey<Map<std::string, std::string> > >
UnwrittenRepository::sync_host_key() const
{
return _imp->sync_host_key;