aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/repositories/e')
-rw-r--r--paludis/repositories/e/e_installed_repository.cc2
-rw-r--r--paludis/repositories/e/e_installed_repository.hh4
-rw-r--r--paludis/repositories/e/e_repository.cc17
-rw-r--r--paludis/repositories/e/e_repository.hh4
-rw-r--r--paludis/repositories/e/exndbam_repository.cc2
-rw-r--r--paludis/repositories/e/exndbam_repository.hh2
-rw-r--r--paludis/repositories/e/vdb_repository.cc2
-rw-r--r--paludis/repositories/e/vdb_repository.hh2
8 files changed, 21 insertions, 14 deletions
diff --git a/paludis/repositories/e/e_installed_repository.cc b/paludis/repositories/e/e_installed_repository.cc
index fe1ea8223..c702b90ff 100644
--- a/paludis/repositories/e/e_installed_repository.cc
+++ b/paludis/repositories/e/e_installed_repository.cc
@@ -399,7 +399,7 @@ EInstalledRepository::populate_sets() const
}
bool
-EInstalledRepository::sync(const std::shared_ptr<OutputManager> &) const
+EInstalledRepository::sync(const std::string &, const std::shared_ptr<OutputManager> &) const
{
return false;
}
diff --git a/paludis/repositories/e/e_installed_repository.hh b/paludis/repositories/e/e_installed_repository.hh
index e028bda9f..4d2716c77 100644
--- a/paludis/repositories/e/e_installed_repository.hh
+++ b/paludis/repositories/e/e_installed_repository.hh
@@ -88,7 +88,9 @@ namespace paludis
const std::shared_ptr<OutputManager> &)
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual bool sync(const std::shared_ptr<OutputManager> &) const;
+ virtual bool sync(
+ const std::string &,
+ const std::shared_ptr<OutputManager> &) const;
///\name For use by EInstalledRepositoryID
///\{
diff --git a/paludis/repositories/e/e_repository.cc b/paludis/repositories/e/e_repository.cc
index be5bd0eec..612cc0f28 100644
--- a/paludis/repositories/e/e_repository.cc
+++ b/paludis/repositories/e/e_repository.cc
@@ -271,7 +271,8 @@ namespace paludis
std::shared_ptr<const MetadataValueKey<FSPath> > accounts_repository_data_location_key;
std::shared_ptr<const MetadataValueKey<FSPath> > e_updates_location_key;
std::shared_ptr<const MetadataValueKey<std::string> > accept_keywords_key;
- std::shared_ptr<const MetadataValueKey<std::string> > sync_host_key;
+ std::shared_ptr<Map<std::string, std::string> > sync_hosts;
+ std::shared_ptr<const MetadataCollectionKey<Map<std::string, std::string> > > sync_host_key;
std::list<std::shared_ptr<const MetadataKey> > about_keys;
std::shared_ptr<EclassMtimes> eclass_mtimes;
@@ -364,9 +365,9 @@ 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_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)),
eclass_mtimes(std::make_shared<EclassMtimes>(r, params.eclassdirs())),
-
master_mtime(0)
{
if ((params.location() / "metadata" / "about.conf").stat().is_regular_file_or_symlink_to_regular_file())
@@ -395,6 +396,8 @@ namespace paludis
FSStat mtfs(mtf.stat());
if (mtfs.exists())
master_mtime = mtfs.mtim().seconds();
+
+ sync_hosts->insert("", extract_host_from_url(params.sync()));
}
Imp<ERepository>::~Imp()
@@ -752,11 +755,13 @@ ERepository::need_mirrors() const
}
bool
-ERepository::sync(const std::shared_ptr<OutputManager> & output_manager) const
+ERepository::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;
@@ -1673,7 +1678,7 @@ ERepository::accept_keywords_key() const
return _imp->accept_keywords_key;
}
-const std::shared_ptr<const MetadataValueKey<std::string> >
+const std::shared_ptr<const MetadataCollectionKey<Map<std::string, std::string> > >
ERepository::sync_host_key() const
{
return _imp->sync_host_key;
diff --git a/paludis/repositories/e/e_repository.hh b/paludis/repositories/e/e_repository.hh
index 2891bb86a..666f07927 100644
--- a/paludis/repositories/e/e_repository.hh
+++ b/paludis/repositories/e/e_repository.hh
@@ -108,7 +108,7 @@ namespace paludis
/* RepositorySyncableInterface */
- virtual bool sync(const std::shared_ptr<OutputManager> &) const;
+ virtual bool sync(const std::string &, const std::shared_ptr<OutputManager> &) const;
/* RepositoryEnvironmentVariableInterface */
@@ -173,7 +173,7 @@ namespace paludis
virtual const std::shared_ptr<const MetadataValueKey<FSPath> > installed_root_key() const;
virtual const std::shared_ptr<const MetadataCollectionKey<Set<std::string> > > info_vars_key() const;
virtual const std::shared_ptr<const MetadataValueKey<std::string> > accept_keywords_key() const;
- virtual const std::shared_ptr<const MetadataValueKey<std::string> > sync_host_key() const;
+ virtual const std::shared_ptr<const MetadataCollectionKey<Map<std::string, std::string> > > sync_host_key() const;
///\name RepositoryFactory functions
///\{
diff --git a/paludis/repositories/e/exndbam_repository.cc b/paludis/repositories/e/exndbam_repository.cc
index 68fbccd75..12b805b43 100644
--- a/paludis/repositories/e/exndbam_repository.cc
+++ b/paludis/repositories/e/exndbam_repository.cc
@@ -285,7 +285,7 @@ ExndbamRepository::installed_root_key() const
return _imp->root_key;
}
-const std::shared_ptr<const MetadataValueKey<std::string> >
+const std::shared_ptr<const MetadataCollectionKey<Map<std::string, std::string> > >
ExndbamRepository::sync_host_key() const
{
return make_null_shared_ptr();
diff --git a/paludis/repositories/e/exndbam_repository.hh b/paludis/repositories/e/exndbam_repository.hh
index 8937379bc..0c6fbb7f9 100644
--- a/paludis/repositories/e/exndbam_repository.hh
+++ b/paludis/repositories/e/exndbam_repository.hh
@@ -116,7 +116,7 @@ namespace paludis
virtual const std::shared_ptr<const MetadataValueKey<FSPath> > location_key() const;
virtual const std::shared_ptr<const MetadataValueKey<FSPath> > installed_root_key() const;
virtual const std::shared_ptr<const MetadataValueKey<std::string> > accept_keywords_key() const;
- virtual const std::shared_ptr<const MetadataValueKey<std::string> > sync_host_key() const;
+ virtual const std::shared_ptr<const MetadataCollectionKey<Map<std::string, std::string> > > sync_host_key() const;
///\name For use by ExndbamID
///\{
diff --git a/paludis/repositories/e/vdb_repository.cc b/paludis/repositories/e/vdb_repository.cc
index e3eb95d3e..efdb3dc91 100644
--- a/paludis/repositories/e/vdb_repository.cc
+++ b/paludis/repositories/e/vdb_repository.cc
@@ -1179,7 +1179,7 @@ VDBRepository::installed_root_key() const
return _imp->root_key;
}
-const std::shared_ptr<const MetadataValueKey<std::string> >
+const std::shared_ptr<const MetadataCollectionKey<Map<std::string, std::string> > >
VDBRepository::sync_host_key() const
{
return make_null_shared_ptr();
diff --git a/paludis/repositories/e/vdb_repository.hh b/paludis/repositories/e/vdb_repository.hh
index e79c53aeb..8e8dfc2ca 100644
--- a/paludis/repositories/e/vdb_repository.hh
+++ b/paludis/repositories/e/vdb_repository.hh
@@ -163,7 +163,7 @@ namespace paludis
virtual const std::shared_ptr<const MetadataValueKey<FSPath> > location_key() const;
virtual const std::shared_ptr<const MetadataValueKey<FSPath> > installed_root_key() const;
virtual const std::shared_ptr<const MetadataValueKey<std::string> > accept_keywords_key() const;
- virtual const std::shared_ptr<const MetadataValueKey<std::string> > sync_host_key() const;
+ virtual const std::shared_ptr<const MetadataCollectionKey<Map<std::string, std::string> > > sync_host_key() const;
///\name RepositoryFactory functions
///\{