aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-10-21 16:20:26 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-10-21 22:01:52 +0100
commitdd3736da2c72911ed8e7c3db6b45ae504d234af4 (patch)
tree1825fd067ea968cfb360c4ecb266c4f01de93789
parent4a4ec386e6bb65a92cf11394aa2022fd06ac871f (diff)
downloadpaludis-dd3736da2c72911ed8e7c3db6b45ae504d234af4.tar.gz
paludis-dd3736da2c72911ed8e7c3db6b45ae504d234af4.tar.xz
There's no point in sync_interface
-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 e80cd56..3155de5 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 c19fa5f..70e19f2 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 317b0f6..31efcb4 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 5b1a1e2..4abc378 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 4bcd5c9..ce6985e 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 33b4084..75dd3d7 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 5e898c8..1d00fdf 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 06e7a28..b9c92ba 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 1bb483a..b278d30 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 ac92ce3..361d6f8 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 4a2ef02..4d72e93 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 b85c9b4..4557059 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 2350c6b..e07076c 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 2d947e8..c2a7276 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 57140c7..0b51bdc 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 7ae08c0..2b9588a 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 981bab2..19fdb00 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 bf267fe..1223fcb 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 a59081c..e76c48e 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 d336303..231e52a 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 3281f6c..6de05df 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 7dc2222..aa7b480 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 e6bd610..6f7397b 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 c05e4d6..e6b4380 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 30527cb..d4a43d4 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 fe13511..4630668 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 6685f6c..dbb8a08 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 55faace..f6bae02 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 23f0318..7af63a9 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 d99bfc2..03ff4ad 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 a2cf45a..cc03643 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 a96ec48..fc460de 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 5509a41..82bb3be 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 6d0d3ed..a52356c 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 50a1da8..0ef2507 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 cfbcf12..366412c 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 bca8cc6..83ef173 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 4f6908a..b6eb208 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 f6433ea..05a886e 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 066057f..e382699 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 46978a1..0a76bc1 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");