aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--paludis/repositories/accounts/accounts_repository.cc8
-rw-r--r--paludis/repositories/accounts/accounts_repository.hh1
-rw-r--r--paludis/repositories/cran/cran_installed_repository.cc7
-rw-r--r--paludis/repositories/cran/cran_installed_repository.hh2
-rw-r--r--paludis/repositories/cran/cran_repository.cc1
-rw-r--r--paludis/repositories/cran/cran_repository.hh1
-rw-r--r--paludis/repositories/e/e_installed_repository.cc6
-rw-r--r--paludis/repositories/e/e_installed_repository.hh2
-rw-r--r--paludis/repositories/e/e_repository.cc1
-rw-r--r--paludis/repositories/e/e_repository.hh1
-rw-r--r--paludis/repositories/e/exndbam_repository.cc1
-rw-r--r--paludis/repositories/e/vdb_repository.cc1
-rw-r--r--paludis/repositories/fake/fake_installed_repository.cc1
-rw-r--r--paludis/repositories/fake/fake_repository.cc2
-rw-r--r--paludis/repositories/fake/fake_repository_base.cc6
-rw-r--r--paludis/repositories/fake/fake_repository_base.hh2
-rw-r--r--paludis/repositories/gems/gems_repository.cc6
-rw-r--r--paludis/repositories/gems/gems_repository.hh2
-rw-r--r--paludis/repositories/gems/installed_gems_repository.cc6
-rw-r--r--paludis/repositories/gems/installed_gems_repository.hh2
-rw-r--r--paludis/repositories/unavailable/unavailable_repository.cc1
-rw-r--r--paludis/repositories/unavailable/unavailable_repository.hh1
-rw-r--r--paludis/repositories/unpackaged/installed_repository.cc6
-rw-r--r--paludis/repositories/unpackaged/installed_repository.hh2
-rw-r--r--paludis/repositories/unpackaged/unpackaged_repository.cc7
-rw-r--r--paludis/repositories/unpackaged/unpackaged_repository.hh2
-rw-r--r--paludis/repositories/unwritten/unwritten_repository.cc1
-rw-r--r--paludis/repositories/unwritten/unwritten_repository.hh1
-rw-r--r--paludis/repositories/virtuals/installed_virtuals_repository.cc7
-rw-r--r--paludis/repositories/virtuals/installed_virtuals_repository.hh2
-rw-r--r--paludis/repositories/virtuals/virtuals_repository.cc7
-rw-r--r--paludis/repositories/virtuals/virtuals_repository.hh2
-rw-r--r--paludis/repository-fwd.hh1
-rw-r--r--paludis/repository.cc4
-rw-r--r--paludis/repository.hh34
-rw-r--r--paludis/sync_task.cc2
-rw-r--r--python/repository.cc21
-rwxr-xr-xpython/repository_TEST.py4
-rw-r--r--ruby/repository.cc2
-rw-r--r--ruby/repository_TEST.rb4
-rw-r--r--src/clients/cave/cmd_sync.cc8
41 files changed, 87 insertions, 91 deletions
diff --git a/paludis/repositories/accounts/accounts_repository.cc b/paludis/repositories/accounts/accounts_repository.cc
index e80cd5678..3155de566 100644
--- a/paludis/repositories/accounts/accounts_repository.cc
+++ b/paludis/repositories/accounts/accounts_repository.cc
@@ -117,7 +117,6 @@ AccountsRepository::AccountsRepository(const AccountsRepositoryParams & p) :
value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)),
value_for<n::mirrors_interface>(static_cast<RepositoryMirrorsInterface *>(0)),
value_for<n::provides_interface>(static_cast<RepositoryProvidesInterface *>(0)),
- value_for<n::syncable_interface>(static_cast<RepositorySyncableInterface *>(0)),
value_for<n::virtuals_interface>(static_cast<RepositoryVirtualsInterface *>(0))
)),
_imp(PrivateImplementationPattern<AccountsRepository>::_imp)
@@ -138,7 +137,6 @@ AccountsRepository::AccountsRepository(const InstalledAccountsRepositoryParams &
value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)),
value_for<n::mirrors_interface>(static_cast<RepositoryMirrorsInterface *>(0)),
value_for<n::provides_interface>(static_cast<RepositoryProvidesInterface *>(0)),
- value_for<n::syncable_interface>(static_cast<RepositorySyncableInterface *>(0)),
value_for<n::virtuals_interface>(static_cast<RepositoryVirtualsInterface *>(0))
)),
_imp(PrivateImplementationPattern<AccountsRepository>::_imp)
@@ -463,5 +461,11 @@ AccountsRepository::perform_hook(const Hook &)
return make_named_values<HookResult>(value_for<n::max_exit_status>(0), value_for<n::output>(""));
}
+bool
+AccountsRepository::sync(const std::tr1::shared_ptr<OutputManager> &) const
+{
+ return false;
+}
+
template class PrivateImplementationPattern<AccountsRepository>;
diff --git a/paludis/repositories/accounts/accounts_repository.hh b/paludis/repositories/accounts/accounts_repository.hh
index c19fa5f1b..70e19f2d3 100644
--- a/paludis/repositories/accounts/accounts_repository.hh
+++ b/paludis/repositories/accounts/accounts_repository.hh
@@ -139,6 +139,7 @@ namespace paludis
virtual void regenerate_cache() const;
virtual HookResult perform_hook(const Hook & hook);
+ virtual bool sync(const std::tr1::shared_ptr<OutputManager> &) const;
///\}
diff --git a/paludis/repositories/cran/cran_installed_repository.cc b/paludis/repositories/cran/cran_installed_repository.cc
index 317b0f64c..31efcb45d 100644
--- a/paludis/repositories/cran/cran_installed_repository.cc
+++ b/paludis/repositories/cran/cran_installed_repository.cc
@@ -170,7 +170,6 @@ CRANInstalledRepository::CRANInstalledRepository(const CRANInstalledRepositoryPa
value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)),
value_for<n::mirrors_interface>(static_cast<RepositoryMirrorsInterface *>(0)),
value_for<n::provides_interface>(static_cast<RepositoryProvidesInterface *>(0)),
- value_for<n::syncable_interface>(static_cast<RepositorySyncableInterface *>(0)),
value_for<n::virtuals_interface>(static_cast<RepositoryVirtualsInterface *>(0))
)),
PrivateImplementationPattern<CRANInstalledRepository>(new Implementation<CRANInstalledRepository>(p)),
@@ -602,3 +601,9 @@ CRANInstalledRepository::perform_hook(const Hook &)
return make_named_values<HookResult>(value_for<n::max_exit_status>(0), value_for<n::output>(""));
}
+bool
+CRANInstalledRepository::sync(const std::tr1::shared_ptr<OutputManager> &) const
+{
+ return false;
+}
+
diff --git a/paludis/repositories/cran/cran_installed_repository.hh b/paludis/repositories/cran/cran_installed_repository.hh
index 5b1a1e2a4..4abc37813 100644
--- a/paludis/repositories/cran/cran_installed_repository.hh
+++ b/paludis/repositories/cran/cran_installed_repository.hh
@@ -142,6 +142,8 @@ namespace paludis
virtual bool some_ids_might_support_action(const SupportsActionTestBase &) const;
+ virtual bool sync(const std::tr1::shared_ptr<OutputManager> &) const;
+
/* Keys */
virtual const std::tr1::shared_ptr<const MetadataValueKey<std::string> > format_key() const;
diff --git a/paludis/repositories/cran/cran_repository.cc b/paludis/repositories/cran/cran_repository.cc
index 4bcd5c901..ce6985ef2 100644
--- a/paludis/repositories/cran/cran_repository.cc
+++ b/paludis/repositories/cran/cran_repository.cc
@@ -115,7 +115,6 @@ CRANRepository::CRANRepository(const CRANRepositoryParams & p) :
value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)),
value_for<n::mirrors_interface>(static_cast<RepositoryMirrorsInterface *>(0)),
value_for<n::provides_interface>(static_cast<RepositoryProvidesInterface *>(0)),
- value_for<n::syncable_interface>(this),
value_for<n::virtuals_interface>(static_cast<RepositoryVirtualsInterface *>(0))
)),
PrivateImplementationPattern<CRANRepository>(new Implementation<CRANRepository>(p, make_shared_ptr(new Mutex))),
diff --git a/paludis/repositories/cran/cran_repository.hh b/paludis/repositories/cran/cran_repository.hh
index 33b4084e9..75dd3d749 100644
--- a/paludis/repositories/cran/cran_repository.hh
+++ b/paludis/repositories/cran/cran_repository.hh
@@ -75,7 +75,6 @@ namespace paludis
*/
class PALUDIS_VISIBLE CRANRepository :
public Repository,
- public RepositorySyncableInterface,
private PrivateImplementationPattern<CRANRepository>,
public std::tr1::enable_shared_from_this<CRANRepository>
{
diff --git a/paludis/repositories/e/e_installed_repository.cc b/paludis/repositories/e/e_installed_repository.cc
index 5e898c8b1..1d00fdf75 100644
--- a/paludis/repositories/e/e_installed_repository.cc
+++ b/paludis/repositories/e/e_installed_repository.cc
@@ -404,3 +404,9 @@ EInstalledRepository::populate_sets() const
true);
}
+bool
+EInstalledRepository::sync(const std::tr1::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 06e7a2828..b9c92ba90 100644
--- a/paludis/repositories/e/e_installed_repository.hh
+++ b/paludis/repositories/e/e_installed_repository.hh
@@ -82,6 +82,8 @@ namespace paludis
HookResult perform_hook(const Hook & hook)
PALUDIS_ATTRIBUTE((warn_unused_result));
+ virtual bool sync(const std::tr1::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 1bb483a30..b278d30a9 100644
--- a/paludis/repositories/e/e_repository.cc
+++ b/paludis/repositories/e/e_repository.cc
@@ -500,7 +500,6 @@ ERepository::ERepository(const ERepositoryParams & p) :
value_for<n::manifest_interface>(this),
value_for<n::mirrors_interface>(this),
value_for<n::provides_interface>(static_cast<RepositoryProvidesInterface *>(0)),
- value_for<n::syncable_interface>(this),
value_for<n::virtuals_interface>((*DistributionData::get_instance()->distribution_from_string(p.environment()->distribution())).support_old_style_virtuals() ? this : 0)
)),
PrivateImplementationPattern<ERepository>(new Implementation<ERepository>(this, p)),
diff --git a/paludis/repositories/e/e_repository.hh b/paludis/repositories/e/e_repository.hh
index ac92ce3df..361d6f8cd 100644
--- a/paludis/repositories/e/e_repository.hh
+++ b/paludis/repositories/e/e_repository.hh
@@ -51,7 +51,6 @@ namespace paludis
*/
class PALUDIS_VISIBLE ERepository :
public Repository,
- public RepositorySyncableInterface,
public RepositoryEnvironmentVariableInterface,
public RepositoryMirrorsInterface,
public RepositoryVirtualsInterface,
diff --git a/paludis/repositories/e/exndbam_repository.cc b/paludis/repositories/e/exndbam_repository.cc
index 4a2ef021b..4d72e93fa 100644
--- a/paludis/repositories/e/exndbam_repository.cc
+++ b/paludis/repositories/e/exndbam_repository.cc
@@ -110,7 +110,6 @@ ExndbamRepository::ExndbamRepository(const RepositoryName & n, const ExndbamRepo
value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)),
value_for<n::mirrors_interface>(static_cast<RepositoryMirrorsInterface *>(0)),
value_for<n::provides_interface>(static_cast<RepositoryProvidesInterface *>(0)),
- value_for<n::syncable_interface>(static_cast<RepositorySyncableInterface *>(0)),
value_for<n::virtuals_interface>(static_cast<RepositoryVirtualsInterface *>(0))
)),
PrivateImplementationPattern<ExndbamRepository>(new Implementation<ExndbamRepository>(p)),
diff --git a/paludis/repositories/e/vdb_repository.cc b/paludis/repositories/e/vdb_repository.cc
index b85c9b4d6..4557059ea 100644
--- a/paludis/repositories/e/vdb_repository.cc
+++ b/paludis/repositories/e/vdb_repository.cc
@@ -171,7 +171,6 @@ VDBRepository::VDBRepository(const VDBRepositoryParams & p) :
value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)),
value_for<n::mirrors_interface>(static_cast<RepositoryMirrorsInterface *>(0)),
value_for<n::provides_interface>(this),
- value_for<n::syncable_interface>(static_cast<RepositorySyncableInterface *>(0)),
value_for<n::virtuals_interface>(static_cast<RepositoryVirtualsInterface *>(0))
)),
PrivateImplementationPattern<VDBRepository>(new Implementation<VDBRepository>(this, p)),
diff --git a/paludis/repositories/fake/fake_installed_repository.cc b/paludis/repositories/fake/fake_installed_repository.cc
index 2350c6bba..e07076ca3 100644
--- a/paludis/repositories/fake/fake_installed_repository.cc
+++ b/paludis/repositories/fake/fake_installed_repository.cc
@@ -66,7 +66,6 @@ FakeInstalledRepository::FakeInstalledRepository(const Environment * const e, co
value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)),
value_for<n::mirrors_interface>(static_cast<RepositoryMirrorsInterface *>(0)),
value_for<n::provides_interface>(this),
- value_for<n::syncable_interface>(static_cast<RepositorySyncableInterface *>(0)),
value_for<n::virtuals_interface>(static_cast<RepositoryVirtualsInterface *>(0))
)),
PrivateImplementationPattern<FakeInstalledRepository>(new Implementation<FakeInstalledRepository>(supports_uninstall, i)),
diff --git a/paludis/repositories/fake/fake_repository.cc b/paludis/repositories/fake/fake_repository.cc
index 2d947e890..c2a7276e9 100644
--- a/paludis/repositories/fake/fake_repository.cc
+++ b/paludis/repositories/fake/fake_repository.cc
@@ -66,7 +66,6 @@ FakeRepository::FakeRepository(const Environment * const env, const RepositoryNa
value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)),
value_for<n::mirrors_interface>(this),
value_for<n::provides_interface>(static_cast<RepositoryProvidesInterface *>(0)),
- value_for<n::syncable_interface>(static_cast<RepositorySyncableInterface *>(0)),
value_for<n::virtuals_interface>((*DistributionData::get_instance()->distribution_from_string(
env->distribution())).support_old_style_virtuals() ? this : 0)
)),
@@ -85,7 +84,6 @@ FakeRepository::FakeRepository(const FakeRepositoryParams & params) :
value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)),
value_for<n::mirrors_interface>(this),
value_for<n::provides_interface>(static_cast<RepositoryProvidesInterface *>(0)),
- value_for<n::syncable_interface>(static_cast<RepositorySyncableInterface *>(0)),
value_for<n::virtuals_interface>((*DistributionData::get_instance()->distribution_from_string(
params.environment()->distribution())).support_old_style_virtuals() ? this : 0)
)),
diff --git a/paludis/repositories/fake/fake_repository_base.cc b/paludis/repositories/fake/fake_repository_base.cc
index 57140c731..0b51bdc26 100644
--- a/paludis/repositories/fake/fake_repository_base.cc
+++ b/paludis/repositories/fake/fake_repository_base.cc
@@ -187,3 +187,9 @@ FakeRepositoryBase::perform_hook(const Hook &)
return make_named_values<HookResult>(value_for<n::max_exit_status>(0), value_for<n::output>(""));
}
+bool
+FakeRepositoryBase::sync(const std::tr1::shared_ptr<OutputManager> &) const
+{
+ return false;
+}
+
diff --git a/paludis/repositories/fake/fake_repository_base.hh b/paludis/repositories/fake/fake_repository_base.hh
index 7ae08c019..2b9588a6d 100644
--- a/paludis/repositories/fake/fake_repository_base.hh
+++ b/paludis/repositories/fake/fake_repository_base.hh
@@ -117,6 +117,8 @@ namespace paludis
virtual bool has_category_named(const CategoryNamePart &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
+ virtual bool sync(const std::tr1::shared_ptr<OutputManager> &) const;
+
///\name Set methods
///\{
diff --git a/paludis/repositories/gems/gems_repository.cc b/paludis/repositories/gems/gems_repository.cc
index 981bab2f1..19fdb004a 100644
--- a/paludis/repositories/gems/gems_repository.cc
+++ b/paludis/repositories/gems/gems_repository.cc
@@ -99,7 +99,6 @@ GemsRepository::GemsRepository(const gems::RepositoryParams & params) :
value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)),
value_for<n::mirrors_interface>(static_cast<RepositoryMirrorsInterface *>(0)),
value_for<n::provides_interface>(static_cast<RepositoryProvidesInterface *>(0)),
- value_for<n::syncable_interface>(static_cast<RepositorySyncableInterface *>(0)),
value_for<n::virtuals_interface>(static_cast<RepositoryVirtualsInterface *>(0))
)),
PrivateImplementationPattern<GemsRepository>(new Implementation<GemsRepository>(params)),
@@ -410,4 +409,9 @@ GemsRepository::perform_hook(const Hook &)
return make_named_values<HookResult>(value_for<n::max_exit_status>(0), value_for<n::output>(""));
}
+bool
+GemsRepository::sync(const std::tr1::shared_ptr<OutputManager> &) const
+{
+ return false;
+}
diff --git a/paludis/repositories/gems/gems_repository.hh b/paludis/repositories/gems/gems_repository.hh
index bf267fe7e..1223fcb79 100644
--- a/paludis/repositories/gems/gems_repository.hh
+++ b/paludis/repositories/gems/gems_repository.hh
@@ -84,6 +84,8 @@ namespace paludis
virtual bool some_ids_might_support_action(const SupportsActionTestBase &) const;
+ virtual bool sync(const std::tr1::shared_ptr<OutputManager> &) const;
+
/* Keys */
virtual const std::tr1::shared_ptr<const MetadataValueKey<std::string> > format_key() const;
diff --git a/paludis/repositories/gems/installed_gems_repository.cc b/paludis/repositories/gems/installed_gems_repository.cc
index a59081cd9..e76c48e11 100644
--- a/paludis/repositories/gems/installed_gems_repository.cc
+++ b/paludis/repositories/gems/installed_gems_repository.cc
@@ -103,7 +103,6 @@ InstalledGemsRepository::InstalledGemsRepository(const gems::InstalledRepository
value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)),
value_for<n::mirrors_interface>(static_cast<RepositoryMirrorsInterface *>(0)),
value_for<n::provides_interface>(static_cast<RepositoryProvidesInterface *>(0)),
- value_for<n::syncable_interface>(static_cast<RepositorySyncableInterface *>(0)),
value_for<n::virtuals_interface>(static_cast<RepositoryVirtualsInterface *>(0))
)),
PrivateImplementationPattern<InstalledGemsRepository>(new Implementation<InstalledGemsRepository>(params)),
@@ -454,4 +453,9 @@ InstalledGemsRepository::perform_hook(const Hook &)
return make_named_values<HookResult>(value_for<n::max_exit_status>(0), value_for<n::output>(""));
}
+bool
+InstalledGemsRepository::sync(const std::tr1::shared_ptr<OutputManager> &) const
+{
+ return false;
+}
diff --git a/paludis/repositories/gems/installed_gems_repository.hh b/paludis/repositories/gems/installed_gems_repository.hh
index d336303e2..231e52af0 100644
--- a/paludis/repositories/gems/installed_gems_repository.hh
+++ b/paludis/repositories/gems/installed_gems_repository.hh
@@ -99,6 +99,8 @@ namespace paludis
virtual bool some_ids_might_support_action(const SupportsActionTestBase &) const;
+ virtual bool sync(const std::tr1::shared_ptr<OutputManager> &) const;
+
/* Keys */
virtual const std::tr1::shared_ptr<const MetadataValueKey<std::string> > format_key() const;
diff --git a/paludis/repositories/unavailable/unavailable_repository.cc b/paludis/repositories/unavailable/unavailable_repository.cc
index 3281f6c5f..6de05df64 100644
--- a/paludis/repositories/unavailable/unavailable_repository.cc
+++ b/paludis/repositories/unavailable/unavailable_repository.cc
@@ -93,7 +93,6 @@ UnavailableRepository::UnavailableRepository(const UnavailableRepositoryParams &
value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)),
value_for<n::mirrors_interface>(static_cast<RepositoryMirrorsInterface *>(0)),
value_for<n::provides_interface>(static_cast<RepositoryProvidesInterface *>(0)),
- value_for<n::syncable_interface>(this),
value_for<n::virtuals_interface>(static_cast<RepositoryVirtualsInterface *>(0))
)),
_imp(PrivateImplementationPattern<UnavailableRepository>::_imp)
diff --git a/paludis/repositories/unavailable/unavailable_repository.hh b/paludis/repositories/unavailable/unavailable_repository.hh
index 7dc22225f..aa7b4807c 100644
--- a/paludis/repositories/unavailable/unavailable_repository.hh
+++ b/paludis/repositories/unavailable/unavailable_repository.hh
@@ -57,7 +57,6 @@ namespace paludis
class PALUDIS_VISIBLE UnavailableRepository :
private PrivateImplementationPattern<UnavailableRepository>,
public Repository,
- public RepositorySyncableInterface,
public std::tr1::enable_shared_from_this<UnavailableRepository>
{
private:
diff --git a/paludis/repositories/unpackaged/installed_repository.cc b/paludis/repositories/unpackaged/installed_repository.cc
index e6bd61026..6f7397b64 100644
--- a/paludis/repositories/unpackaged/installed_repository.cc
+++ b/paludis/repositories/unpackaged/installed_repository.cc
@@ -98,7 +98,6 @@ InstalledUnpackagedRepository::InstalledUnpackagedRepository(
value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)),
value_for<n::mirrors_interface>(static_cast<RepositoryMirrorsInterface *>(0)),
value_for<n::provides_interface>(static_cast<RepositoryProvidesInterface *>(0)),
- value_for<n::syncable_interface>(static_cast<RepositorySyncableInterface *>(0)),
value_for<n::virtuals_interface>(static_cast<RepositoryVirtualsInterface *>(0))
)),
_imp(PrivateImplementationPattern<InstalledUnpackagedRepository>::_imp)
@@ -517,4 +516,9 @@ InstalledUnpackagedRepository::perform_hook(const Hook &)
return make_named_values<HookResult>(value_for<n::max_exit_status>(0), value_for<n::output>(""));
}
+bool
+InstalledUnpackagedRepository::sync(const std::tr1::shared_ptr<OutputManager> &) const
+{
+ return false;
+}
diff --git a/paludis/repositories/unpackaged/installed_repository.hh b/paludis/repositories/unpackaged/installed_repository.hh
index c05e4d6c7..e6b438001 100644
--- a/paludis/repositories/unpackaged/installed_repository.hh
+++ b/paludis/repositories/unpackaged/installed_repository.hh
@@ -134,6 +134,8 @@ namespace paludis
virtual HookResult perform_hook(const Hook & hook)
PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual bool sync(const std::tr1::shared_ptr<OutputManager> &) const;
};
}
diff --git a/paludis/repositories/unpackaged/unpackaged_repository.cc b/paludis/repositories/unpackaged/unpackaged_repository.cc
index 30527cb88..d4a43d4db 100644
--- a/paludis/repositories/unpackaged/unpackaged_repository.cc
+++ b/paludis/repositories/unpackaged/unpackaged_repository.cc
@@ -103,7 +103,6 @@ UnpackagedRepository::UnpackagedRepository(const RepositoryName & n,
value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)),
value_for<n::mirrors_interface>(static_cast<RepositoryMirrorsInterface *>(0)),
value_for<n::provides_interface>(static_cast<RepositoryProvidesInterface *>(0)),
- value_for<n::syncable_interface>(static_cast<RepositorySyncableInterface *>(0)),
value_for<n::virtuals_interface>(static_cast<RepositoryVirtualsInterface *>(0))
)),
_imp(PrivateImplementationPattern<UnpackagedRepository>::_imp)
@@ -287,4 +286,8 @@ UnpackagedRepository::perform_hook(const Hook &)
return make_named_values<HookResult>(value_for<n::max_exit_status>(0), value_for<n::output>(""));
}
-
+bool
+UnpackagedRepository::sync(const std::tr1::shared_ptr<OutputManager> &) const
+{
+ return false;
+}
diff --git a/paludis/repositories/unpackaged/unpackaged_repository.hh b/paludis/repositories/unpackaged/unpackaged_repository.hh
index fe13511dc..463066884 100644
--- a/paludis/repositories/unpackaged/unpackaged_repository.hh
+++ b/paludis/repositories/unpackaged/unpackaged_repository.hh
@@ -101,6 +101,8 @@ namespace paludis
virtual bool some_ids_might_support_action(const SupportsActionTestBase &) const;
+ virtual bool sync(const std::tr1::shared_ptr<OutputManager> &) const;
+
/* Keys */
virtual const std::tr1::shared_ptr<const MetadataValueKey<std::string> > format_key() const;
diff --git a/paludis/repositories/unwritten/unwritten_repository.cc b/paludis/repositories/unwritten/unwritten_repository.cc
index 6685f6c14..dbb8a088f 100644
--- a/paludis/repositories/unwritten/unwritten_repository.cc
+++ b/paludis/repositories/unwritten/unwritten_repository.cc
@@ -93,7 +93,6 @@ UnwrittenRepository::UnwrittenRepository(const UnwrittenRepositoryParams & p) :
value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)),
value_for<n::mirrors_interface>(static_cast<RepositoryMirrorsInterface *>(0)),
value_for<n::provides_interface>(static_cast<RepositoryProvidesInterface *>(0)),
- value_for<n::syncable_interface>(this),
value_for<n::virtuals_interface>(static_cast<RepositoryVirtualsInterface *>(0))
)),
_imp(PrivateImplementationPattern<UnwrittenRepository>::_imp)
diff --git a/paludis/repositories/unwritten/unwritten_repository.hh b/paludis/repositories/unwritten/unwritten_repository.hh
index 55faace19..f6bae025b 100644
--- a/paludis/repositories/unwritten/unwritten_repository.hh
+++ b/paludis/repositories/unwritten/unwritten_repository.hh
@@ -56,7 +56,6 @@ namespace paludis
class PALUDIS_VISIBLE UnwrittenRepository :
private PrivateImplementationPattern<UnwrittenRepository>,
public Repository,
- public RepositorySyncableInterface,
public std::tr1::enable_shared_from_this<UnwrittenRepository>
{
private:
diff --git a/paludis/repositories/virtuals/installed_virtuals_repository.cc b/paludis/repositories/virtuals/installed_virtuals_repository.cc
index 23f03183e..7af63a974 100644
--- a/paludis/repositories/virtuals/installed_virtuals_repository.cc
+++ b/paludis/repositories/virtuals/installed_virtuals_repository.cc
@@ -117,7 +117,6 @@ InstalledVirtualsRepository::InstalledVirtualsRepository(const Environment * con
value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)),
value_for<n::mirrors_interface>(static_cast<RepositoryMirrorsInterface *>(0)),
value_for<n::provides_interface>(static_cast<RepositoryProvidesInterface *>(0)),
- value_for<n::syncable_interface>(static_cast<RepositorySyncableInterface *>(0)),
value_for<n::virtuals_interface>(static_cast<RepositoryVirtualsInterface *>(0))
)),
PrivateImplementationPattern<InstalledVirtualsRepository>(
@@ -386,3 +385,9 @@ InstalledVirtualsRepository::populate_sets() const
{
}
+bool
+InstalledVirtualsRepository::sync(const std::tr1::shared_ptr<OutputManager> &) const
+{
+ return false;
+}
+
diff --git a/paludis/repositories/virtuals/installed_virtuals_repository.hh b/paludis/repositories/virtuals/installed_virtuals_repository.hh
index d99bfc2b0..03ff4adc3 100644
--- a/paludis/repositories/virtuals/installed_virtuals_repository.hh
+++ b/paludis/repositories/virtuals/installed_virtuals_repository.hh
@@ -106,6 +106,8 @@ namespace paludis
virtual bool some_ids_might_support_action(const SupportsActionTestBase &) const;
+ virtual bool sync(const std::tr1::shared_ptr<OutputManager> &) const;
+
/* Keys */
virtual const std::tr1::shared_ptr<const MetadataValueKey<std::string> > format_key() const;
diff --git a/paludis/repositories/virtuals/virtuals_repository.cc b/paludis/repositories/virtuals/virtuals_repository.cc
index a2cf45a60..cc0364392 100644
--- a/paludis/repositories/virtuals/virtuals_repository.cc
+++ b/paludis/repositories/virtuals/virtuals_repository.cc
@@ -129,7 +129,6 @@ VirtualsRepository::VirtualsRepository(const Environment * const env) :
value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)),
value_for<n::mirrors_interface>(static_cast<RepositoryMirrorsInterface *>(0)),
value_for<n::provides_interface>(static_cast<RepositoryProvidesInterface *>(0)),
- value_for<n::syncable_interface>(static_cast<RepositorySyncableInterface *>(0)),
value_for<n::virtuals_interface>(static_cast<RepositoryVirtualsInterface *>(0))
)),
PrivateImplementationPattern<VirtualsRepository>(
@@ -463,4 +462,10 @@ VirtualsRepository::perform_hook(const Hook &)
return make_named_values<HookResult>(value_for<n::max_exit_status>(0), value_for<n::output>(""));
}
+bool
+VirtualsRepository::sync(const std::tr1::shared_ptr<OutputManager> &) const
+{
+ return false;
+}
+
diff --git a/paludis/repositories/virtuals/virtuals_repository.hh b/paludis/repositories/virtuals/virtuals_repository.hh
index a96ec4845..fc460de19 100644
--- a/paludis/repositories/virtuals/virtuals_repository.hh
+++ b/paludis/repositories/virtuals/virtuals_repository.hh
@@ -103,6 +103,8 @@ namespace paludis
virtual bool some_ids_might_support_action(const SupportsActionTestBase &) const;
+ virtual bool sync(const std::tr1::shared_ptr<OutputManager> &) const;
+
/* RepositoryMakeVirtualsInterface */
virtual const std::tr1::shared_ptr<const PackageID> make_virtual_package_id(
diff --git a/paludis/repository-fwd.hh b/paludis/repository-fwd.hh
index 5509a4189..82bb3be7f 100644
--- a/paludis/repository-fwd.hh
+++ b/paludis/repository-fwd.hh
@@ -40,7 +40,6 @@ namespace paludis
class ERepositoryProfile;
class Repository;
- class RepositorySyncableInterface;
class RepositoryEnvironmentVariableInterface;
class RepositoryMirrorsInterface;
class RepositoryProvidesInterface;
diff --git a/paludis/repository.cc b/paludis/repository.cc
index 6d0d3ed56..a52356cb1 100644
--- a/paludis/repository.cc
+++ b/paludis/repository.cc
@@ -184,10 +184,6 @@ Repository::purge_invalid_cache() const
{
}
-RepositorySyncableInterface::~RepositorySyncableInterface()
-{
-}
-
RepositoryEnvironmentVariableInterface::~RepositoryEnvironmentVariableInterface()
{
}
diff --git a/paludis/repository.hh b/paludis/repository.hh
index 50a1da871..0ef250798 100644
--- a/paludis/repository.hh
+++ b/paludis/repository.hh
@@ -75,7 +75,6 @@ namespace paludis
struct provided_by_spec;
struct provides_interface;
struct status;
- struct syncable_interface;
struct used_this_for_config_protect;
struct virtual_name;
struct virtuals_interface;
@@ -97,7 +96,6 @@ namespace paludis
NamedValue<n::manifest_interface, RepositoryManifestInterface *> manifest_interface;
NamedValue<n::mirrors_interface, RepositoryMirrorsInterface *> mirrors_interface;
NamedValue<n::provides_interface, RepositoryProvidesInterface *> provides_interface;
- NamedValue<n::syncable_interface, RepositorySyncableInterface *> syncable_interface;
NamedValue<n::virtuals_interface, RepositoryVirtualsInterface *> virtuals_interface;
};
@@ -396,6 +394,13 @@ namespace paludis
virtual HookResult perform_hook(const Hook & hook)
PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
+ /**
+ * Sync, if necessary.
+ *
+ * \return True if we synced successfully, false if we skipped sync.
+ * \since 0.42 (previously in an interface)
+ */
+ virtual bool sync(const std::tr1::shared_ptr<OutputManager> &) const = 0;
///\}
@@ -416,31 +421,6 @@ namespace paludis
};
/**
- * Interface for syncing for repositories.
- *
- * \see Repository
- * \ingroup g_repository
- * \nosubgrouping
- */
- class PALUDIS_VISIBLE RepositorySyncableInterface
- {
- public:
- ///\name Sync functions
- ///\{
-
- /**
- * Sync, if necessary.
- *
- * \return True if we synced successfully, false if we skipped sync.
- */
- virtual bool sync(const std::tr1::shared_ptr<OutputManager> &) const = 0;
-
- ///\}
-
- virtual ~RepositorySyncableInterface();
- };
-
- /**
* Interface for environment variable querying for repositories.
*
* \see Repository
diff --git a/paludis/sync_task.cc b/paludis/sync_task.cc
index cfbcf121f..366412ca9 100644
--- a/paludis/sync_task.cc
+++ b/paludis/sync_task.cc
@@ -117,7 +117,7 @@ namespace
std::tr1::shared_ptr<const Repository> rr(env->package_database()->fetch_repository(r));
CreateOutputManagerForRepositorySyncInfo info(*rr, oe_exclusive);
std::tr1::shared_ptr<OutputManager> output_manager(env->create_output_manager(info));
- if ((*rr).syncable_interface() && (*rr).syncable_interface()->sync(output_manager))
+ if (rr->sync(output_manager))
{
Lock l(mutex);
task->on_sync_succeed(r);
diff --git a/python/repository.cc b/python/repository.cc
index bca8cc646..83ef173ff 100644
--- a/python/repository.cc
+++ b/python/repository.cc
@@ -38,12 +38,6 @@ struct RepositoryWrapper :
Repository,
bp::wrapper<Repository>
{
- static RepositorySyncableInterface *
- get_syncable_interface(const Repository & self)
- {
- return self.syncable_interface();
- }
-
static RepositoryMirrorsInterface *
get_mirrors_interface(const Repository & self)
{
@@ -203,11 +197,6 @@ void expose_repository()
"entirely when looking for installable packages."
)
- .add_property("syncable_interface", bp::make_function(&RepositoryWrapper::get_syncable_interface,
- bp::return_internal_reference<>()),
- "[ro] RepositorySyncableInterface"
- )
-
.add_property("environment_variable_interface",
bp::make_function(&RepositoryWrapper::get_environment_variable_interface,
bp::return_internal_reference<>()),
@@ -285,16 +274,6 @@ void expose_repository()
;
/**
- * RepositorySyncableInterface
- */
- bp::class_<RepositorySyncableInterface, boost::noncopyable>
- (
- "RepositorySyncableInterface",
- "Interface for syncing for repositories.",
- bp::no_init
- );
-
- /**
* RepositoryEnvironmentVariableInterface
*/
bp::class_<RepositoryEnvironmentVariableInterface, boost::noncopyable>
diff --git a/python/repository_TEST.py b/python/repository_TEST.py
index 4f6908a4f..b6eb20847 100755
--- a/python/repository_TEST.py
+++ b/python/repository_TEST.py
@@ -107,10 +107,6 @@ class TestCase_02_RepositoryInterfaces(unittest.TestCase):
repo = db.fetch_repository("testrepo")
irepo = db.fetch_repository("installed")
- def test_03_syncable_interface(self):
- si = repo.syncable_interface
- self.assert_(isinstance(si, RepositorySyncableInterface))
-
def test_06_environment_variable_interface(self):
evi = repo.environment_variable_interface
self.assert_(isinstance(evi, RepositoryEnvironmentVariableInterface))
diff --git a/ruby/repository.cc b/ruby/repository.cc
index f6433eab5..05a886e8c 100644
--- a/ruby/repository.cc
+++ b/ruby/repository.cc
@@ -827,8 +827,6 @@ namespace
rb_define_method(c_repository, "package_names", RUBY_FUNC_CAST(&repository_package_names), 1);
rb_define_method(c_repository, "package_ids", RUBY_FUNC_CAST(&repository_package_ids), 1);
- rb_define_method(c_repository, "syncable_interface", RUBY_FUNC_CAST((&Interface<
- n::syncable_interface, RepositorySyncableInterface, &Repository::syncable_interface>::fetch)), 0);
rb_define_method(c_repository, "mirrors_interface", RUBY_FUNC_CAST((&Interface<
n::mirrors_interface, RepositoryMirrorsInterface, &Repository::mirrors_interface>::fetch)), 0);
rb_define_method(c_repository, "environment_variable_interface", RUBY_FUNC_CAST((&Interface<
diff --git a/ruby/repository_TEST.rb b/ruby/repository_TEST.rb
index 066057f00..e3826994f 100644
--- a/ruby/repository_TEST.rb
+++ b/ruby/repository_TEST.rb
@@ -165,7 +165,7 @@ module Paludis
def test_responds
repo = no_config_testrepo.main_repository
- [:syncable_interface,
+ [
:mirrors_interface, :environment_variable_interface,
:provides_interface, :virtuals_interface, :e_interface].each do |sym|
assert_respond_to repo, sym
@@ -174,7 +174,7 @@ module Paludis
def test_interfaces
assert_equal installed_repo.name, installed_repo.provides_interface.name
- assert_nil installed_repo.syncable_interface
+ assert_nil installed_repo.e_interface
end
def text_repository_environment_interface
diff --git a/src/clients/cave/cmd_sync.cc b/src/clients/cave/cmd_sync.cc
index 46978a1a1..0a76bc1eb 100644
--- a/src/clients/cave/cmd_sync.cc
+++ b/src/clients/cave/cmd_sync.cc
@@ -189,9 +189,6 @@ namespace
}
const std::tr1::shared_ptr<const Repository> repo(env->package_database()->fetch_repository(r));
- if (! repo->syncable_interface())
- throw BadRepositoryForCommand(r, "does not support syncing");
-
bool result(false);
{
Mutex notifier_mutex;
@@ -205,7 +202,7 @@ namespace
try
{
- result = repo->syncable_interface()->sync(output_manager);
+ result = repo->sync(output_manager);
{
Lock lock(mutex);
@@ -331,8 +328,7 @@ SyncCommand::run(
for (PackageDatabase::RepositoryConstIterator p(env->package_database()->begin_repositories()),
p_end(env->package_database()->end_repositories()) ;
p != p_end ; ++p)
- if ((*p)->syncable_interface())
- repos.insert((*p)->name());
+ repos.insert((*p)->name());
cout << format_general_s(f::sync_heading(), "Starting sync");