aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/fake
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/repositories/fake')
-rw-r--r--paludis/repositories/fake/fake_installed_repository.cc1
-rw-r--r--paludis/repositories/fake/fake_repository.cc4
-rw-r--r--paludis/repositories/fake/fake_repository_base.cc31
-rw-r--r--paludis/repositories/fake/fake_repository_base.hh21
4 files changed, 13 insertions, 44 deletions
diff --git a/paludis/repositories/fake/fake_installed_repository.cc b/paludis/repositories/fake/fake_installed_repository.cc
index 5a7f23e7b..814b729cf 100644
--- a/paludis/repositories/fake/fake_installed_repository.cc
+++ b/paludis/repositories/fake/fake_installed_repository.cc
@@ -65,7 +65,6 @@ FakeInstalledRepository::FakeInstalledRepository(const Environment * const e, co
value_for<n::mirrors_interface>(static_cast<RepositoryMirrorsInterface *>(0)),
value_for<n::provides_interface>(this),
value_for<n::qa_interface>(static_cast<RepositoryQAInterface *>(0)),
- value_for<n::sets_interface>(this),
value_for<n::syncable_interface>(static_cast<RepositorySyncableInterface *>(0)),
value_for<n::virtuals_interface>(static_cast<RepositoryVirtualsInterface *>(0))
)),
diff --git a/paludis/repositories/fake/fake_repository.cc b/paludis/repositories/fake/fake_repository.cc
index 9bca8104e..765fb28a8 100644
--- a/paludis/repositories/fake/fake_repository.cc
+++ b/paludis/repositories/fake/fake_repository.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2005, 2006, 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2005, 2006, 2007, 2008, 2009 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -68,7 +68,6 @@ FakeRepository::FakeRepository(const Environment * const env, const RepositoryNa
value_for<n::mirrors_interface>(this),
value_for<n::provides_interface>(static_cast<RepositoryProvidesInterface *>(0)),
value_for<n::qa_interface>(static_cast<RepositoryQAInterface *>(0)),
- value_for<n::sets_interface>(this),
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)
@@ -90,7 +89,6 @@ FakeRepository::FakeRepository(const FakeRepositoryParams & params) :
value_for<n::mirrors_interface>(this),
value_for<n::provides_interface>(static_cast<RepositoryProvidesInterface *>(0)),
value_for<n::qa_interface>(static_cast<RepositoryQAInterface *>(0)),
- value_for<n::sets_interface>(this),
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 8f0515bc5..51ce3694a 100644
--- a/paludis/repositories/fake/fake_repository_base.cc
+++ b/paludis/repositories/fake/fake_repository_base.cc
@@ -48,7 +48,6 @@ namespace paludis
std::tr1::shared_ptr<CategoryNamePartSet> category_names;
std::map<CategoryNamePart, std::tr1::shared_ptr<PackageNamePartSet> > package_names;
std::map<QualifiedPackageName, std::tr1::shared_ptr<PackageIDSequence> > ids;
- std::map<SetName, std::tr1::shared_ptr<const SetSpecTree> > sets;
const Environment * const env;
@@ -164,31 +163,6 @@ FakeRepositoryBase::invalidate_masks()
(*it2)->invalidate_masks();
}
-void
-FakeRepositoryBase::add_package_set(const SetName & n, const std::tr1::shared_ptr<const SetSpecTree> & s)
-{
- _imp->sets.insert(std::make_pair(n, s));
-}
-
-const std::tr1::shared_ptr<const SetSpecTree>
-FakeRepositoryBase::package_set(const SetName & id) const
-{
- std::map<SetName, std::tr1::shared_ptr<const SetSpecTree> >::const_iterator i(_imp->sets.find(id));
- if (_imp->sets.end() == i)
- return std::tr1::shared_ptr<const SetSpecTree>();
- else
- return i->second;
-}
-
-std::tr1::shared_ptr<const SetNameSet>
-FakeRepositoryBase::sets_list() const
-{
- std::tr1::shared_ptr<SetNameSet> result(new SetNameSet);
- std::transform(_imp->sets.begin(), _imp->sets.end(), result->inserter(),
- std::tr1::mem_fn(&std::pair<const SetName, std::tr1::shared_ptr<const SetSpecTree> >::first));
- return result;
-}
-
const Environment *
FakeRepositoryBase::environment() const
{
@@ -200,3 +174,8 @@ FakeRepositoryBase::need_keys_added() const
{
}
+void
+FakeRepositoryBase::populate_sets() const
+{
+}
+
diff --git a/paludis/repositories/fake/fake_repository_base.hh b/paludis/repositories/fake/fake_repository_base.hh
index 136530a8a..b2548b59b 100644
--- a/paludis/repositories/fake/fake_repository_base.hh
+++ b/paludis/repositories/fake/fake_repository_base.hh
@@ -44,7 +44,6 @@ namespace paludis
*/
class PALUDIS_VISIBLE FakeRepositoryBase :
public Repository,
- public RepositorySetsInterface,
private PrivateImplementationPattern<FakeRepositoryBase>,
public std::tr1::enable_shared_from_this<FakeRepositoryBase>
{
@@ -90,11 +89,6 @@ namespace paludis
std::tr1::shared_ptr<FakePackageID> add_version(const std::string & c, const std::string & p,
const std::string & v);
- /**
- * Add a package set.
- */
- void add_package_set(const SetName &, const std::tr1::shared_ptr<const SetSpecTree> &);
-
virtual void invalidate();
virtual void invalidate_masks();
@@ -104,14 +98,6 @@ namespace paludis
*/
const Environment * environment() const;
- /* RepositorySetsInterface */
-
- virtual const std::tr1::shared_ptr<const SetSpecTree> package_set(const SetName & id) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual std::tr1::shared_ptr<const SetNameSet> sets_list() const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
/* Repository */
virtual std::tr1::shared_ptr<const PackageIDSequence> package_ids(
@@ -130,6 +116,13 @@ namespace paludis
virtual bool has_category_named(const CategoryNamePart &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ ///\name Set methods
+ ///\{
+
+ virtual void populate_sets() const;
+
+ ///\}
};
}