aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-10-26 06:22:59 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-10-26 06:22:59 +0000
commit676210330328f04eda39fa5ee9b173e3acc86b88 (patch)
treef4603334a8cb43a35ce29d6cd473c41e5afeb71f
parentff653fb58c83e7269c3b6ae85ed5b1ff55232b9f (diff)
downloadpaludis-676210330328f04eda39fa5ee9b173e3acc86b88.tar.gz
paludis-676210330328f04eda39fa5ee9b173e3acc86b88.tar.xz
Kill repository NVIs, License interface. Fixes: ticket:394
-rw-r--r--paludis/repositories/cran/cran_installed_repository.cc21
-rw-r--r--paludis/repositories/cran/cran_installed_repository.hh53
-rw-r--r--paludis/repositories/cran/cran_repository.cc23
-rw-r--r--paludis/repositories/cran/cran_repository.hh58
-rw-r--r--paludis/repositories/e/e_repository.cc67
-rw-r--r--paludis/repositories/e/e_repository.hh144
-rw-r--r--paludis/repositories/e/vdb_repository.cc41
-rw-r--r--paludis/repositories/e/vdb_repository.hh105
-rw-r--r--paludis/repositories/fake/fake_installed_repository.cc3
-rw-r--r--paludis/repositories/fake/fake_installed_repository.hh4
-rw-r--r--paludis/repositories/fake/fake_repository.cc3
-rw-r--r--paludis/repositories/fake/fake_repository.hh5
-rw-r--r--paludis/repositories/fake/fake_repository_base.cc28
-rw-r--r--paludis/repositories/fake/fake_repository_base.hh109
-rw-r--r--paludis/repositories/gems/gems_repository.cc15
-rw-r--r--paludis/repositories/gems/gems_repository.hh43
-rw-r--r--paludis/repositories/gems/installed_gems_repository.cc15
-rw-r--r--paludis/repositories/gems/installed_gems_repository.hh52
-rw-r--r--paludis/repositories/unpackaged/installed_repository.cc17
-rw-r--r--paludis/repositories/unpackaged/installed_repository.hh53
-rw-r--r--paludis/repositories/unpackaged/unpackaged_repository.cc15
-rw-r--r--paludis/repositories/unpackaged/unpackaged_repository.hh35
-rw-r--r--paludis/repositories/virtuals/installed_virtuals_repository.cc19
-rw-r--r--paludis/repositories/virtuals/installed_virtuals_repository.hh48
-rw-r--r--paludis/repositories/virtuals/virtuals_repository.cc13
-rw-r--r--paludis/repositories/virtuals/virtuals_repository.hh56
-rw-r--r--paludis/repository-fwd.hh1
-rw-r--r--paludis/repository.cc113
-rw-r--r--paludis/repository.hh210
-rw-r--r--paludis/repository.sr1
-rw-r--r--python/repository.cc39
-rwxr-xr-xpython/repository_TEST.py7
32 files changed, 518 insertions, 898 deletions
diff --git a/paludis/repositories/cran/cran_installed_repository.cc b/paludis/repositories/cran/cran_installed_repository.cc
index e958a2d..3d06050 100644
--- a/paludis/repositories/cran/cran_installed_repository.cc
+++ b/paludis/repositories/cran/cran_installed_repository.cc
@@ -163,7 +163,6 @@ CRANInstalledRepository::CRANInstalledRepository(const CRANInstalledRepositoryPa
.virtuals_interface(0)
.provides_interface(0)
.destination_interface(this)
- .licenses_interface(0)
.e_interface(0)
.qa_interface(0)
.make_virtuals_interface(0)
@@ -186,17 +185,17 @@ CRANInstalledRepository::~CRANInstalledRepository()
}
bool
-CRANInstalledRepository::do_has_category_named(const CategoryNamePart & c) const
+CRANInstalledRepository::has_category_named(const CategoryNamePart & c) const
{
return (CategoryNamePart("cran") == c);
}
bool
-CRANInstalledRepository::do_has_package_named(const QualifiedPackageName & q) const
+CRANInstalledRepository::has_package_named(const QualifiedPackageName & q) const
{
Context context("When checking for package '" + stringify(q) + "' in " + stringify(name()) + ":");
- if (! do_has_category_named(q.category))
+ if (! has_category_named(q.category))
return false;
need_ids();
@@ -205,7 +204,7 @@ CRANInstalledRepository::do_has_package_named(const QualifiedPackageName & q) co
}
tr1::shared_ptr<const CategoryNamePartSet>
-CRANInstalledRepository::do_category_names() const
+CRANInstalledRepository::category_names() const
{
tr1::shared_ptr<CategoryNamePartSet> result(new CategoryNamePartSet);
result->insert(CategoryNamePart("cran"));
@@ -213,13 +212,13 @@ CRANInstalledRepository::do_category_names() const
}
tr1::shared_ptr<const QualifiedPackageNameSet>
-CRANInstalledRepository::do_package_names(const CategoryNamePart & c) const
+CRANInstalledRepository::package_names(const CategoryNamePart & c) const
{
Context context("When fetching package names in category '" + stringify(c)
+ "' in " + stringify(name()) + ":");
tr1::shared_ptr<QualifiedPackageNameSet> result(new QualifiedPackageNameSet);
- if (! do_has_category_named(c))
+ if (! has_category_named(c))
return result;
need_ids();
@@ -231,13 +230,13 @@ CRANInstalledRepository::do_package_names(const CategoryNamePart & c) const
}
tr1::shared_ptr<const PackageIDSequence>
-CRANInstalledRepository::do_package_ids(const QualifiedPackageName & n) const
+CRANInstalledRepository::package_ids(const QualifiedPackageName & n) const
{
Context context("When fetching versions of '" + stringify(n) + "' in "
+ stringify(name()) + ":");
tr1::shared_ptr<PackageIDSequence> result(new PackageIDSequence);
- if (! do_has_package_named(n))
+ if (! has_package_named(n))
return result;
need_ids();
@@ -426,7 +425,7 @@ CRANInstalledRepository::do_uninstall(const QualifiedPackageName & q, const Vers
#endif
tr1::shared_ptr<SetSpecTree::ConstItem>
-CRANInstalledRepository::do_package_set(const SetName & s) const
+CRANInstalledRepository::package_set(const SetName & s) const
{
Context context("When fetching package set '" + stringify(s) + "' from '" +
stringify(name()) + "':");
@@ -648,7 +647,7 @@ namespace
}
bool
-CRANInstalledRepository::do_some_ids_might_support_action(const SupportsActionTestBase & a) const
+CRANInstalledRepository::some_ids_might_support_action(const SupportsActionTestBase & a) const
{
SupportsActionQuery q;
a.accept(q);
diff --git a/paludis/repositories/cran/cran_installed_repository.hh b/paludis/repositories/cran/cran_installed_repository.hh
index df5aeee..00b141a 100644
--- a/paludis/repositories/cran/cran_installed_repository.hh
+++ b/paludis/repositories/cran/cran_installed_repository.hh
@@ -57,33 +57,6 @@ namespace paludis
void add_string_to_world(const std::string & n) const;
void remove_string_from_world(const std::string &) const;
- protected:
- /* Repository */
-
- virtual tr1::shared_ptr<const PackageIDSequence> do_package_ids(
- const QualifiedPackageName &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual tr1::shared_ptr<const QualifiedPackageNameSet> do_package_names(
- const CategoryNamePart &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual tr1::shared_ptr<const CategoryNamePartSet> do_category_names() const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual bool do_has_package_named(const QualifiedPackageName &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual bool do_has_category_named(const CategoryNamePart &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual bool do_some_ids_might_support_action(const SupportsActionTestBase &) const;
-
- /* RepositorySetsInterface */
-
- virtual tr1::shared_ptr<SetSpecTree::ConstItem> do_package_set(const SetName & id) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
public:
/**
* Constructor.
@@ -133,6 +106,32 @@ namespace paludis
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual void merge(const MergeOptions &);
+
+ /* Repository */
+
+ virtual tr1::shared_ptr<const PackageIDSequence> package_ids(
+ const QualifiedPackageName &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual tr1::shared_ptr<const QualifiedPackageNameSet> package_names(
+ const CategoryNamePart &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual tr1::shared_ptr<const CategoryNamePartSet> category_names() const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual bool has_package_named(const QualifiedPackageName &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual bool has_category_named(const CategoryNamePart &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual bool some_ids_might_support_action(const SupportsActionTestBase &) const;
+
+ /* RepositorySetsInterface */
+
+ virtual tr1::shared_ptr<SetSpecTree::ConstItem> package_set(const SetName & id) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
};
/**
diff --git a/paludis/repositories/cran/cran_repository.cc b/paludis/repositories/cran/cran_repository.cc
index 1f14c0a..b03dcde 100644
--- a/paludis/repositories/cran/cran_repository.cc
+++ b/paludis/repositories/cran/cran_repository.cc
@@ -113,7 +113,6 @@ CRANRepository::CRANRepository(const CRANRepositoryParams & p) :
.provides_interface(0)
.destination_interface(0)
.virtuals_interface(0)
- .licenses_interface(0)
.e_interface(0)
.qa_interface(0)
.hook_interface(0)
@@ -138,18 +137,18 @@ CRANRepository::~CRANRepository()
}
bool
-CRANRepository::do_has_category_named(const CategoryNamePart & c) const
+CRANRepository::has_category_named(const CategoryNamePart & c) const
{
return "cran" == stringify(c);
}
bool
-CRANRepository::do_has_package_named(const QualifiedPackageName & q) const
+CRANRepository::has_package_named(const QualifiedPackageName & q) const
{
Context context("When checking for package '" + stringify(q) + "' in " + stringify(name()) + ":");
Lock l(*_imp->big_nasty_mutex);
- if (! do_has_category_named(q.category))
+ if (! has_category_named(q.category))
return false;
need_ids();
@@ -157,7 +156,7 @@ CRANRepository::do_has_package_named(const QualifiedPackageName & q) const
}
tr1::shared_ptr<const CategoryNamePartSet>
-CRANRepository::do_category_names() const
+CRANRepository::category_names() const
{
Context context("When fetching category names in " + stringify(name()) + ":");
Lock l(*_imp->big_nasty_mutex);
@@ -169,14 +168,14 @@ CRANRepository::do_category_names() const
}
tr1::shared_ptr<const QualifiedPackageNameSet>
-CRANRepository::do_package_names(const CategoryNamePart & c) const
+CRANRepository::package_names(const CategoryNamePart & c) const
{
Context context("When fetching package names in category '" + stringify(c)
+ "' in " + stringify(name()) + ":");
Lock l(*_imp->big_nasty_mutex);
tr1::shared_ptr<QualifiedPackageNameSet> result(new QualifiedPackageNameSet);
- if (! do_has_category_named(c))
+ if (! has_category_named(c))
return result;
need_ids();
@@ -188,14 +187,14 @@ CRANRepository::do_package_names(const CategoryNamePart & c) const
}
tr1::shared_ptr<const PackageIDSequence>
-CRANRepository::do_package_ids(const QualifiedPackageName & n) const
+CRANRepository::package_ids(const QualifiedPackageName & n) const
{
Context context("When fetching versions of '" + stringify(n) + "' in "
+ stringify(name()) + ":");
Lock l(*_imp->big_nasty_mutex);
tr1::shared_ptr<PackageIDSequence> result(new PackageIDSequence);
- if (! do_has_package_named(n))
+ if (! has_package_named(n))
return result;
need_ids();
@@ -337,7 +336,7 @@ CRANRepository::do_install(const tr1::shared_ptr<const PackageID> & id_uncasted,
#endif
tr1::shared_ptr<SetSpecTree::ConstItem>
-CRANRepository::do_package_set(const SetName & s) const
+CRANRepository::package_set(const SetName & s) const
{
if ("base" == s.data())
{
@@ -363,7 +362,7 @@ CRANRepository::sets_list() const
}
bool
-CRANRepository::do_sync() const
+CRANRepository::sync() const
{
Context context("When syncing repository '" + stringify(name()) + "':");
Lock l(*_imp->big_nasty_mutex);
@@ -494,7 +493,7 @@ namespace
}
bool
-CRANRepository::do_some_ids_might_support_action(const SupportsActionTestBase & a) const
+CRANRepository::some_ids_might_support_action(const SupportsActionTestBase & a) const
{
SupportsActionQuery q;
a.accept(q);
diff --git a/paludis/repositories/cran/cran_repository.hh b/paludis/repositories/cran/cran_repository.hh
index ce0734e..a8e54c9 100644
--- a/paludis/repositories/cran/cran_repository.hh
+++ b/paludis/repositories/cran/cran_repository.hh
@@ -63,57 +63,57 @@ namespace paludis
*/
static RepositoryName fetch_repo_name(const std::string & location);
+ public:
+ /**
+ * Constructor.
+ */
+ CRANRepository(const CRANRepositoryParams &);
+
+ /**
+ * Virtual constructor.
+ */
+ static tr1::shared_ptr<Repository> make_cran_repository(
+ Environment * const env,
+ tr1::shared_ptr<const Map<std::string, std::string> > m);
+
+ /**
+ * Destructor.
+ */
+ virtual ~CRANRepository();
+
+ virtual void invalidate();
+ virtual void invalidate_masks();
+
/* RepositorySyncableInterface */
- virtual tr1::shared_ptr<SetSpecTree::ConstItem> do_package_set(const SetName &) const;
+ virtual tr1::shared_ptr<SetSpecTree::ConstItem> package_set(const SetName &) const;
virtual tr1::shared_ptr<const SetNameSet> sets_list() const;
/* RepositorySyncableInterface */
- virtual bool do_sync() const;
+ virtual bool sync() const;
/* Repository */
- virtual tr1::shared_ptr<const QualifiedPackageNameSet> do_package_names(
+ virtual tr1::shared_ptr<const QualifiedPackageNameSet> package_names(
const CategoryNamePart &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const CategoryNamePartSet> do_category_names() const
+ virtual tr1::shared_ptr<const CategoryNamePartSet> category_names() const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual bool do_has_package_named(const QualifiedPackageName &) const
+ virtual bool has_package_named(const QualifiedPackageName &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual bool do_has_category_named(const CategoryNamePart &) const
+ virtual bool has_category_named(const CategoryNamePart &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const PackageIDSequence> do_package_ids(
+ virtual tr1::shared_ptr<const PackageIDSequence> package_ids(
const QualifiedPackageName &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual bool do_some_ids_might_support_action(const SupportsActionTestBase &) const;
-
- public:
- /**
- * Constructor.
- */
- CRANRepository(const CRANRepositoryParams &);
-
- /**
- * Virtual constructor.
- */
- static tr1::shared_ptr<Repository> make_cran_repository(
- Environment * const env,
- tr1::shared_ptr<const Map<std::string, std::string> > m);
-
- /**
- * Destructor.
- */
- virtual ~CRANRepository();
-
- virtual void invalidate();
- virtual void invalidate_masks();
+ virtual bool some_ids_might_support_action(const SupportsActionTestBase &) const;
};
/**
diff --git a/paludis/repositories/e/e_repository.cc b/paludis/repositories/e/e_repository.cc
index e7df6b4..c3cff5f 100644
--- a/paludis/repositories/e/e_repository.cc
+++ b/paludis/repositories/e/e_repository.cc
@@ -305,7 +305,6 @@ ERepository::ERepository(const ERepositoryParams & p) :
p.environment->default_distribution())->support_old_style_virtuals ? this : 0)
.provides_interface(0)
.destination_interface(p.enable_destinations ? this : 0)
- .licenses_interface(this)
.make_virtuals_interface(0)
.e_interface(this)
#ifdef ENABLE_QA
@@ -356,31 +355,31 @@ ERepository::~ERepository()
}
bool
-ERepository::do_has_category_named(const CategoryNamePart & c) const
+ERepository::has_category_named(const CategoryNamePart & c) const
{
return _imp->layout->has_category_named(c);
}
bool
-ERepository::do_has_package_named(const QualifiedPackageName & q) const
+ERepository::has_package_named(const QualifiedPackageName & q) const
{
return _imp->layout->has_package_named(q);
}
tr1::shared_ptr<const CategoryNamePartSet>
-ERepository::do_category_names() const
+ERepository::category_names() const
{
return _imp->layout->category_names();
}
tr1::shared_ptr<const QualifiedPackageNameSet>
-ERepository::do_package_names(const CategoryNamePart & c) const
+ERepository::package_names(const CategoryNamePart & c) const
{
return _imp->layout->package_names(c);
}
tr1::shared_ptr<const PackageIDSequence>
-ERepository::do_package_ids(const QualifiedPackageName & n) const
+ERepository::package_ids(const QualifiedPackageName & n) const
{
return _imp->layout->package_ids(n);
}
@@ -442,29 +441,34 @@ ERepository::repository_masked(const PackageID & id) const
}
UseFlagState
-ERepository::do_query_use(const UseFlagName & f, const PackageID & e) const
+ERepository::query_use(const UseFlagName & f, const PackageID & e) const
{
_imp->need_profiles();
- return _imp->profile_ptr->use_state_ignoring_masks(f, e);
+ if (query_use_mask(f, e))
+ return use_disabled;
+ else if (query_use_force(f, e))
+ return use_enabled;
+ else
+ return _imp->profile_ptr->use_state_ignoring_masks(f, e);
}
bool
-ERepository::do_query_use_mask(const UseFlagName & u, const PackageID & e) const
+ERepository::query_use_mask(const UseFlagName & u, const PackageID & e) const
{
_imp->need_profiles();
return _imp->profile_ptr->use_masked(u, e) ||
- (arch_flags()->end() != arch_flags()->find(u) && use_enabled != do_query_use(u, e));
+ (arch_flags()->end() != arch_flags()->find(u) && use_enabled != query_use(u, e));
}
bool
-ERepository::do_query_use_force(const UseFlagName & u, const PackageID & e) const
+ERepository::query_use_force(const UseFlagName & u, const PackageID & e) const
{
_imp->need_profiles();
return _imp->profile_ptr->use_forced(u, e);
}
tr1::shared_ptr<const UseFlagNameSet>
-ERepository::do_arch_flags() const
+ERepository::arch_flags() const
{
Lock l(_imp->mutexes->arch_flags_mutex);
if (! _imp->arch_flags)
@@ -495,25 +499,6 @@ ERepository::do_arch_flags() const
return _imp->arch_flags;
}
-tr1::shared_ptr<FSEntry>
-ERepository::do_license_exists(const std::string & license) const
-{
- tr1::shared_ptr<FSEntry> p;
-
- if (_imp->params.master_repository)
- {
- FSEntry l(_imp->params.master_repository->params().location / "licenses" / license);
- if (l.exists() && l.is_regular_file_or_symlink_to_regular_file())
- p.reset(new FSEntry(l));
- }
-
- FSEntry l(_imp->params.location / "licenses" / license);
- if (l.exists() && l.is_regular_file_or_symlink_to_regular_file())
- p.reset(new FSEntry(l));
-
- return p;
-}
-
void
ERepository::need_mirrors() const
{
@@ -561,7 +546,7 @@ ERepository::need_mirrors() const
}
tr1::shared_ptr<SetSpecTree::ConstItem>
-ERepository::do_package_set(const SetName & s) const
+ERepository::package_set(const SetName & s) const
{
if (s.data() == "system")
{
@@ -579,7 +564,7 @@ ERepository::sets_list() const
}
bool
-ERepository::do_sync() const
+ERepository::sync() const
{
Context context("When syncing repository '" + stringify(name()) + "':");
@@ -771,7 +756,7 @@ ERepository::virtual_packages() const
}
tr1::shared_ptr<const UseFlagNameSet>
-ERepository::do_use_expand_flags() const
+ERepository::use_expand_flags() const
{
_imp->need_profiles();
@@ -797,7 +782,7 @@ ERepository::do_use_expand_flags() const
}
tr1::shared_ptr<const UseFlagNameSet>
-ERepository::do_use_expand_prefixes() const
+ERepository::use_expand_prefixes() const
{
_imp->need_profiles();
@@ -814,7 +799,7 @@ ERepository::do_use_expand_prefixes() const
}
tr1::shared_ptr<const UseFlagNameSet>
-ERepository::do_use_expand_hidden_prefixes() const
+ERepository::use_expand_hidden_prefixes() const
{
_imp->need_profiles();
@@ -837,15 +822,15 @@ ERepository::regenerate_cache() const
}
tr1::shared_ptr<const CategoryNamePartSet>
-ERepository::do_category_names_containing_package(const PackageNamePart & p) const
+ERepository::category_names_containing_package(const PackageNamePart & p) const
{
if (! _imp->names_cache->usable())
- return Repository::do_category_names_containing_package(p);
+ return Repository::category_names_containing_package(p);
tr1::shared_ptr<const CategoryNamePartSet> result(
_imp->names_cache->category_names_containing_package(p));
- return result ? result : Repository::do_category_names_containing_package(p);
+ return result ? result : Repository::category_names_containing_package(p);
}
ERepository::ProfilesConstIterator
@@ -911,7 +896,7 @@ ERepository::set_profile_by_arch(const UseFlagName & arch)
}
std::string
-ERepository::do_describe_use_flag(const UseFlagName & f,
+ERepository::describe_use_flag(const UseFlagName & f,
const PackageID & e) const
{
Lock l(_imp->mutexes->use_desc_mutex);
@@ -1118,7 +1103,7 @@ namespace
}
bool
-ERepository::do_some_ids_might_support_action(const SupportsActionTestBase & a) const
+ERepository::some_ids_might_support_action(const SupportsActionTestBase & a) const
{
SupportsActionQuery q;
a.accept(q);
diff --git a/paludis/repositories/e/e_repository.hh b/paludis/repositories/e/e_repository.hh
index b5c53bf..576f176 100644
--- a/paludis/repositories/e/e_repository.hh
+++ b/paludis/repositories/e/e_repository.hh
@@ -58,7 +58,6 @@ namespace paludis
public RepositoryMirrorsInterface,
public RepositoryVirtualsInterface,
public RepositoryDestinationInterface,
- public RepositoryLicensesInterface,
public RepositoryEInterface,
public RepositoryHookInterface,
public RepositoryQAInterface,
@@ -69,80 +68,6 @@ namespace paludis
private:
void need_mirrors() const;
- protected:
- /* RepositoryLicensesInterface */
-
- virtual tr1::shared_ptr<FSEntry> do_license_exists(
- const std::string & license) const;
-
- /* RepositorySetsInterface */
-
- virtual tr1::shared_ptr<SetSpecTree::ConstItem> do_package_set(const SetName & id) const;
-
- virtual tr1::shared_ptr<const SetNameSet> sets_list() const;
-
- /* RepositorySyncableInterface */
-
- virtual bool do_sync() const;
-
- /* RepositoryUseInterface */
-
- virtual UseFlagState do_query_use(const UseFlagName &, const PackageID &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual bool do_query_use_mask(const UseFlagName &, const PackageID &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual bool do_query_use_force(const UseFlagName &, const PackageID &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual tr1::shared_ptr<const UseFlagNameSet> do_arch_flags() const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual tr1::shared_ptr<const UseFlagNameSet> do_use_expand_flags() const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual tr1::shared_ptr<const UseFlagNameSet> do_use_expand_hidden_prefixes() const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual tr1::shared_ptr<const UseFlagNameSet> do_use_expand_prefixes() const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual std::string do_describe_use_flag(const UseFlagName &,
- const PackageID &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- /* RepositoryEnvironmentVariableInterface */
-
- virtual std::string get_environment_variable(
- const tr1::shared_ptr<const PackageID> & for_package,
- const std::string & var) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- /* Repository */
-
- virtual tr1::shared_ptr<const PackageIDSequence> do_package_ids(
- const QualifiedPackageName &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual tr1::shared_ptr<const QualifiedPackageNameSet> do_package_names(
- const CategoryNamePart &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual tr1::shared_ptr<const CategoryNamePartSet> do_category_names() const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual tr1::shared_ptr<const CategoryNamePartSet> do_category_names_containing_package(
- const PackageNamePart &) const;
-
- virtual bool do_has_package_named(const QualifiedPackageName &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual bool do_has_category_named(const CategoryNamePart &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual bool do_some_ids_might_support_action(const SupportsActionTestBase &) const;
-
public:
virtual tr1::shared_ptr<const RepositoryInfo> info(bool verbose) const;
@@ -197,6 +122,75 @@ namespace paludis
/* RepositoryManifestInterface */
virtual void make_manifest(const QualifiedPackageName & qpn);
+ /* RepositorySetsInterface */
+
+ virtual tr1::shared_ptr<SetSpecTree::ConstItem> package_set(const SetName & id) const;
+
+ virtual tr1::shared_ptr<const SetNameSet> sets_list() const;
+
+ /* RepositorySyncableInterface */
+
+ virtual bool sync() const;
+
+ /* RepositoryUseInterface */
+
+ virtual UseFlagState query_use(const UseFlagName &, const PackageID &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual bool query_use_mask(const UseFlagName &, const PackageID &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual bool query_use_force(const UseFlagName &, const PackageID &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual tr1::shared_ptr<const UseFlagNameSet> arch_flags() const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual tr1::shared_ptr<const UseFlagNameSet> use_expand_flags() const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual tr1::shared_ptr<const UseFlagNameSet> use_expand_hidden_prefixes() const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual tr1::shared_ptr<const UseFlagNameSet> use_expand_prefixes() const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual std::string describe_use_flag(const UseFlagName &,
+ const PackageID &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ /* RepositoryEnvironmentVariableInterface */
+
+ virtual std::string get_environment_variable(
+ const tr1::shared_ptr<const PackageID> & for_package,
+ const std::string & var) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ /* Repository */
+
+ virtual tr1::shared_ptr<const PackageIDSequence> package_ids(
+ const QualifiedPackageName &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual tr1::shared_ptr<const QualifiedPackageNameSet> package_names(
+ const CategoryNamePart &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual tr1::shared_ptr<const CategoryNamePartSet> category_names() const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual tr1::shared_ptr<const CategoryNamePartSet> category_names_containing_package(
+ const PackageNamePart &) const;
+
+ virtual bool has_package_named(const QualifiedPackageName &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual bool has_category_named(const CategoryNamePart &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual bool some_ids_might_support_action(const SupportsActionTestBase &) const;
+
+
///\name Information about ERepository
///\{
diff --git a/paludis/repositories/e/vdb_repository.cc b/paludis/repositories/e/vdb_repository.cc
index d3cf9d2..b5ac4f3 100644
--- a/paludis/repositories/e/vdb_repository.cc
+++ b/paludis/repositories/e/vdb_repository.cc
@@ -144,7 +144,6 @@ VDBRepository::VDBRepository(const VDBRepositoryParams & p) :
.provides_interface(this)
.virtuals_interface(0)
.destination_interface(this)
- .licenses_interface(0)
.e_interface(0)
.make_virtuals_interface(0)
.qa_interface(0)
@@ -171,7 +170,7 @@ VDBRepository::~VDBRepository()
}
bool
-VDBRepository::do_has_category_named(const CategoryNamePart & c) const
+VDBRepository::has_category_named(const CategoryNamePart & c) const
{
Lock l(*_imp->big_nasty_mutex);
@@ -183,7 +182,7 @@ VDBRepository::do_has_category_named(const CategoryNamePart & c) const
}
bool
-VDBRepository::do_has_package_named(const QualifiedPackageName & q) const
+VDBRepository::has_package_named(const QualifiedPackageName & q) const
{
Lock l(*_imp->big_nasty_mutex);
@@ -202,7 +201,7 @@ VDBRepository::do_has_package_named(const QualifiedPackageName & q) const
}
tr1::shared_ptr<const CategoryNamePartSet>
-VDBRepository::do_category_names() const
+VDBRepository::category_names() const
{
Lock l(*_imp->big_nasty_mutex);
@@ -220,7 +219,7 @@ VDBRepository::do_category_names() const
}
tr1::shared_ptr<const QualifiedPackageNameSet>
-VDBRepository::do_package_names(const CategoryNamePart & c) const
+VDBRepository::package_names(const CategoryNamePart & c) const
{
Lock l(*_imp->big_nasty_mutex);
@@ -239,7 +238,7 @@ VDBRepository::do_package_names(const CategoryNamePart & c) const
}
tr1::shared_ptr<const PackageIDSequence>
-VDBRepository::do_package_ids(const QualifiedPackageName & n) const
+VDBRepository::package_ids(const QualifiedPackageName & n) const
{
Lock l(*_imp->big_nasty_mutex);
@@ -259,7 +258,7 @@ VDBRepository::do_package_ids(const QualifiedPackageName & n) const
}
UseFlagState
-VDBRepository::do_query_use(const UseFlagName & f, const PackageID & e) const
+VDBRepository::query_use(const UseFlagName & f, const PackageID & e) const
{
Lock l(*_imp->big_nasty_mutex);
@@ -273,15 +272,15 @@ VDBRepository::do_query_use(const UseFlagName & f, const PackageID & e) const
}
bool
-VDBRepository::do_query_use_mask(const UseFlagName & u, const PackageID & e) const
+VDBRepository::query_use_mask(const UseFlagName & u, const PackageID & e) const
{
- return use_disabled == do_query_use(u, e);
+ return use_disabled == query_use(u, e);
}
bool
-VDBRepository::do_query_use_force(const UseFlagName & u, const PackageID & e) const
+VDBRepository::query_use_force(const UseFlagName & u, const PackageID & e) const
{
- return use_enabled == do_query_use(u, e);
+ return use_enabled == query_use(u, e);
}
tr1::shared_ptr<Repository>
@@ -584,7 +583,7 @@ VDBRepository::perform_info(const tr1::shared_ptr<const ERepositoryID> & id) con
}
tr1::shared_ptr<SetSpecTree::ConstItem>
-VDBRepository::do_package_set(const SetName & s) const
+VDBRepository::package_set(const SetName & s) const
{
using namespace tr1::placeholders;
@@ -793,25 +792,25 @@ VDBRepository::provided_packages() const
}
tr1::shared_ptr<const UseFlagNameSet>
-VDBRepository::do_arch_flags() const
+VDBRepository::arch_flags() const
{
return tr1::shared_ptr<const UseFlagNameSet>(new UseFlagNameSet);
}
tr1::shared_ptr<const UseFlagNameSet>
-VDBRepository::do_use_expand_flags() const
+VDBRepository::use_expand_flags() const
{
return tr1::shared_ptr<const UseFlagNameSet>(new UseFlagNameSet);
}
tr1::shared_ptr<const UseFlagNameSet>
-VDBRepository::do_use_expand_prefixes() const
+VDBRepository::use_expand_prefixes() const
{
return tr1::shared_ptr<const UseFlagNameSet>(new UseFlagNameSet);
}
tr1::shared_ptr<const UseFlagNameSet>
-VDBRepository::do_use_expand_hidden_prefixes() const
+VDBRepository::use_expand_hidden_prefixes() const
{
return tr1::shared_ptr<const UseFlagNameSet>(new UseFlagNameSet);
}
@@ -1025,17 +1024,17 @@ VDBRepository::regenerate_provides_cache() const
}
tr1::shared_ptr<const CategoryNamePartSet>
-VDBRepository::do_category_names_containing_package(const PackageNamePart & p) const
+VDBRepository::category_names_containing_package(const PackageNamePart & p) const
{
Lock l(*_imp->big_nasty_mutex);
if (! _imp->names_cache->usable())
- return Repository::do_category_names_containing_package(p);
+ return Repository::category_names_containing_package(p);
tr1::shared_ptr<const CategoryNamePartSet> result(
_imp->names_cache->category_names_containing_package(p));
- return result ? result : Repository::do_category_names_containing_package(p);
+ return result ? result : Repository::category_names_containing_package(p);
}
bool
@@ -1052,7 +1051,7 @@ VDBRepository::is_default_destination() const
}
std::string
-VDBRepository::do_describe_use_flag(const UseFlagName &, const PackageID &) const
+VDBRepository::describe_use_flag(const UseFlagName &, const PackageID &) const
{
return "";
}
@@ -1308,7 +1307,7 @@ namespace
}
bool
-VDBRepository::do_some_ids_might_support_action(const SupportsActionTestBase & a) const
+VDBRepository::some_ids_might_support_action(const SupportsActionTestBase & a) const
{
SupportsActionQuery q;
a.accept(q);
diff --git a/paludis/repositories/e/vdb_repository.hh b/paludis/repositories/e/vdb_repository.hh
index 2843cbb..bd65893 100644
--- a/paludis/repositories/e/vdb_repository.hh
+++ b/paludis/repositories/e/vdb_repository.hh
@@ -81,6 +81,42 @@ namespace paludis
const FSEntry &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
+ public:
+ /**
+ * Constructor.
+ */
+ VDBRepository(const VDBRepositoryParams &);
+
+ /**
+ * Virtual constructor.
+ */
+ static tr1::shared_ptr<Repository> make_vdb_repository(
+ Environment * const env,
+ tr1::shared_ptr<const Map<std::string, std::string> > m);
+
+ /**
+ * Destructor.
+ */
+ ~VDBRepository();
+
+ virtual void invalidate();
+
+ virtual void invalidate_masks();
+
+ virtual void regenerate_cache() const;
+
+ ///\name For use by VDBID
+ ///\{
+
+ void perform_uninstall(const tr1::shared_ptr<const erepository::ERepositoryID> & id,
+ const UninstallActionOptions & o, bool reinstalling) const;
+
+ void perform_config(const tr1::shared_ptr<const erepository::ERepositoryID> & id) const;
+
+ void perform_info(const tr1::shared_ptr<const erepository::ERepositoryID> & id) const;
+
+ ///\}
+
/* RepositoryInstalledInterface */
virtual FSEntry root() const
@@ -88,34 +124,34 @@ namespace paludis
/* RepositoryUseInterface */
- virtual UseFlagState do_query_use(const UseFlagName &, const PackageID &) const
+ virtual UseFlagState query_use(const UseFlagName &, const PackageID &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual bool do_query_use_mask(const UseFlagName &, const PackageID &) const
+ virtual bool query_use_mask(const UseFlagName &, const PackageID &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual bool do_query_use_force(const UseFlagName &, const PackageID &) const
+ virtual bool query_use_force(const UseFlagName &, const PackageID &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const UseFlagNameSet> do_arch_flags() const
+ virtual tr1::shared_ptr<const UseFlagNameSet> arch_flags() const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const UseFlagNameSet> do_use_expand_flags() const
+ virtual tr1::shared_ptr<const UseFlagNameSet> use_expand_flags() const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const UseFlagNameSet> do_use_expand_hidden_prefixes() const
+ virtual tr1::shared_ptr<const UseFlagNameSet> use_expand_hidden_prefixes() const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const UseFlagNameSet> do_use_expand_prefixes() const
+ virtual tr1::shared_ptr<const UseFlagNameSet> use_expand_prefixes() const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual std::string do_describe_use_flag(const UseFlagName &,
+ virtual std::string describe_use_flag(const UseFlagName &,
const PackageID &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
/* RepositorySetsInterface */
- virtual tr1::shared_ptr<SetSpecTree::ConstItem> do_package_set(const SetName & id) const
+ virtual tr1::shared_ptr<SetSpecTree::ConstItem> package_set(const SetName & id) const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual tr1::shared_ptr<const SetNameSet> sets_list() const
@@ -163,81 +199,44 @@ namespace paludis
/* Repository */
- virtual tr1::shared_ptr<const PackageIDSequence> do_package_ids(
+ virtual tr1::shared_ptr<const PackageIDSequence> package_ids(
const QualifiedPackageName &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
/**
* Override in descendents: fetch package names.
*/
- virtual tr1::shared_ptr<const QualifiedPackageNameSet> do_package_names(
+ virtual tr1::shared_ptr<const QualifiedPackageNameSet> package_names(
const CategoryNamePart &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
/**
* Override in descendents: fetch category names.
*/
- virtual tr1::shared_ptr<const CategoryNamePartSet> do_category_names() const
+ virtual tr1::shared_ptr<const CategoryNamePartSet> category_names() const
PALUDIS_ATTRIBUTE((warn_unused_result));
/**
* Override in descendents if a fast implementation is available: fetch category names
* that contain a particular package.
*/
- virtual tr1::shared_ptr<const CategoryNamePartSet> do_category_names_containing_package(
+ virtual tr1::shared_ptr<const CategoryNamePartSet> category_names_containing_package(
const PackageNamePart &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
/**
* Override in descendents: check for a package.
*/
- virtual bool do_has_package_named(const QualifiedPackageName &) const
+ virtual bool has_package_named(const QualifiedPackageName &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
/**
* Override in descendents: check for a category.
*/
- virtual bool do_has_category_named(const CategoryNamePart &) const
+ virtual bool has_category_named(const CategoryNamePart &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual bool do_some_ids_might_support_action(const SupportsActionTestBase &) const;
-
- public:
- /**
- * Constructor.
- */
- VDBRepository(const VDBRepositoryParams &);
-
- /**
- * Virtual constructor.
- */
- static tr1::shared_ptr<Repository> make_vdb_repository(
- Environment * const env,
- tr1::shared_ptr<const Map<std::string, std::string> > m);
-
- /**
- * Destructor.
- */
- ~VDBRepository();
-
- virtual void invalidate();
-
- virtual void invalidate_masks();
-
- virtual void regenerate_cache() const;
-
- ///\name For use by VDBID
- ///\{
-
- void perform_uninstall(const tr1::shared_ptr<const erepository::ERepositoryID> & id,
- const UninstallActionOptions & o, bool reinstalling) const;
-
- void perform_config(const tr1::shared_ptr<const erepository::ERepositoryID> & id) const;
-
- void perform_info(const tr1::shared_ptr<const erepository::ERepositoryID> & id) const;
-
- ///\}
-
+ virtual bool some_ids_might_support_action(const SupportsActionTestBase &) const;
};
/**
diff --git a/paludis/repositories/fake/fake_installed_repository.cc b/paludis/repositories/fake/fake_installed_repository.cc
index 5bc37c6..644959b 100644
--- a/paludis/repositories/fake/fake_installed_repository.cc
+++ b/paludis/repositories/fake/fake_installed_repository.cc
@@ -47,7 +47,6 @@ FakeInstalledRepository::FakeInstalledRepository(const Environment * const e, co
.provides_interface(this)
.virtuals_interface(0)
.destination_interface(this)
- .licenses_interface(0)
.e_interface(0)
.make_virtuals_interface(0)
.qa_interface(0)
@@ -168,7 +167,7 @@ namespace
}
bool
-FakeInstalledRepository::do_some_ids_might_support_action(const SupportsActionTestBase & a) const
+FakeInstalledRepository::some_ids_might_support_action(const SupportsActionTestBase & a) const
{
SupportsActionQuery q;
a.accept(q);
diff --git a/paludis/repositories/fake/fake_installed_repository.hh b/paludis/repositories/fake/fake_installed_repository.hh
index bbc26d9..782c22a 100644
--- a/paludis/repositories/fake/fake_installed_repository.hh
+++ b/paludis/repositories/fake/fake_installed_repository.hh
@@ -36,8 +36,6 @@ namespace paludis
public RepositoryProvidesInterface
{
protected:
- virtual bool do_some_ids_might_support_action(const SupportsActionTestBase &) const;
-
/* RepositoryInstalledInterface */
virtual FSEntry root() const PALUDIS_ATTRIBUTE((warn_unused_result));
@@ -68,6 +66,8 @@ namespace paludis
~FakeInstalledRepository();
///\}
+
+ virtual bool some_ids_might_support_action(const SupportsActionTestBase &) const;
};
}
diff --git a/paludis/repositories/fake/fake_repository.cc b/paludis/repositories/fake/fake_repository.cc
index e666f79..425c469 100644
--- a/paludis/repositories/fake/fake_repository.cc
+++ b/paludis/repositories/fake/fake_repository.cc
@@ -67,7 +67,6 @@ FakeRepository::FakeRepository(const Environment * const e, const RepositoryName
.virtuals_interface(DistributionData::get_instance()->distribution_from_string(
e->default_distribution())->support_old_style_virtuals ? this : 0)
.destination_interface(0)
- .licenses_interface(0)
.e_interface(0)
.make_virtuals_interface(0)
.qa_interface(0)
@@ -152,7 +151,7 @@ namespace
}
bool
-FakeRepository::do_some_ids_might_support_action(const SupportsActionTestBase & a) const
+FakeRepository::some_ids_might_support_action(const SupportsActionTestBase & a) const
{
SupportsActionQuery q;
a.accept(q);
diff --git a/paludis/repositories/fake/fake_repository.hh b/paludis/repositories/fake/fake_repository.hh
index c79b98f..6eea633 100644
--- a/paludis/repositories/fake/fake_repository.hh
+++ b/paludis/repositories/fake/fake_repository.hh
@@ -38,9 +38,6 @@ namespace paludis
private:
Implementation<FakeRepository> * const _imp;
- protected:
- virtual bool do_some_ids_might_support_action(const SupportsActionTestBase &) const;
-
public:
///\name Basic operations
///\{
@@ -66,6 +63,8 @@ namespace paludis
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual MirrorsConstIterator end_mirrors(const std::string & s) const
PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual bool some_ids_might_support_action(const SupportsActionTestBase &) const;
};
}
diff --git a/paludis/repositories/fake/fake_repository_base.cc b/paludis/repositories/fake/fake_repository_base.cc
index 645d8d7..5ffec03 100644
--- a/paludis/repositories/fake/fake_repository_base.cc
+++ b/paludis/repositories/fake/fake_repository_base.cc
@@ -93,13 +93,13 @@ FakeRepositoryBase::~FakeRepositoryBase()
}
bool
-FakeRepositoryBase::do_has_category_named(const CategoryNamePart & c) const
+FakeRepositoryBase::has_category_named(const CategoryNamePart & c) const
{
return (_imp->category_names->end() != _imp->category_names->find(c));
}
bool
-FakeRepositoryBase::do_has_package_named(const QualifiedPackageName & q) const
+FakeRepositoryBase::has_package_named(const QualifiedPackageName & q) const
{
return has_category_named(q.category) &&
(_imp->package_names.find(q.category)->second->end() !=
@@ -107,13 +107,13 @@ FakeRepositoryBase::do_has_package_named(const QualifiedPackageName & q) const
}
tr1::shared_ptr<const CategoryNamePartSet>
-FakeRepositoryBase::do_category_names() const
+FakeRepositoryBase::category_names() const
{
return _imp->category_names;
}
tr1::shared_ptr<const QualifiedPackageNameSet>
-FakeRepositoryBase::do_package_names(const CategoryNamePart & c) const
+FakeRepositoryBase::package_names(const CategoryNamePart & c) const
{
tr1::shared_ptr<QualifiedPackageNameSet> result(new QualifiedPackageNameSet);
if (! has_category_named(c))
@@ -127,7 +127,7 @@ FakeRepositoryBase::do_package_names(const CategoryNamePart & c) const
}
tr1::shared_ptr<const PackageIDSequence>
-FakeRepositoryBase::do_package_ids(const QualifiedPackageName & n) const
+FakeRepositoryBase::package_ids(const QualifiedPackageName & n) const
{
if (! has_category_named(n.category))
return tr1::shared_ptr<PackageIDSequence>(new PackageIDSequence);
@@ -161,25 +161,25 @@ FakeRepositoryBase::add_version(const QualifiedPackageName & q, const VersionSpe
}
UseFlagState
-FakeRepositoryBase::do_query_use(const UseFlagName &, const PackageID &) const
+FakeRepositoryBase::query_use(const UseFlagName &, const PackageID &) const
{
return use_unspecified;
}
bool
-FakeRepositoryBase::do_query_use_mask(const UseFlagName &, const PackageID &) const
+FakeRepositoryBase::query_use_mask(const UseFlagName &, const PackageID &) const
{
return false;
}
bool
-FakeRepositoryBase::do_query_use_force(const UseFlagName &, const PackageID &) const
+FakeRepositoryBase::query_use_force(const UseFlagName &, const PackageID &) const
{
return false;
}
tr1::shared_ptr<const UseFlagNameSet>
-FakeRepositoryBase::do_arch_flags() const
+FakeRepositoryBase::arch_flags() const
{
return tr1::shared_ptr<const UseFlagNameSet>(new UseFlagNameSet);
}
@@ -200,19 +200,19 @@ FakeRepositoryBase::invalidate_masks()
}
tr1::shared_ptr<const UseFlagNameSet>
-FakeRepositoryBase::do_use_expand_flags() const
+FakeRepositoryBase::use_expand_flags() const
{
return tr1::shared_ptr<const UseFlagNameSet>(new UseFlagNameSet);
}
tr1::shared_ptr<const UseFlagNameSet>
-FakeRepositoryBase::do_use_expand_hidden_prefixes() const
+FakeRepositoryBase::use_expand_hidden_prefixes() const
{
return tr1::shared_ptr<const UseFlagNameSet>(new UseFlagNameSet);
}
tr1::shared_ptr<const UseFlagNameSet>
-FakeRepositoryBase::do_use_expand_prefixes() const
+FakeRepositoryBase::use_expand_prefixes() const
{
return tr1::shared_ptr<const UseFlagNameSet>(new UseFlagNameSet);
}
@@ -224,7 +224,7 @@ FakeRepositoryBase::add_package_set(const SetName & n, tr1::shared_ptr<SetSpecTr
}
tr1::shared_ptr<SetSpecTree::ConstItem>
-FakeRepositoryBase::do_package_set(const SetName & id) const
+FakeRepositoryBase::package_set(const SetName & id) const
{
std::map<SetName, tr1::shared_ptr<SetSpecTree::ConstItem> >::const_iterator i(_imp->sets.find(id));
if (_imp->sets.end() == i)
@@ -243,7 +243,7 @@ FakeRepositoryBase::sets_list() const
}
std::string
-FakeRepositoryBase::do_describe_use_flag(const UseFlagName &,
+FakeRepositoryBase::describe_use_flag(const UseFlagName &,
const PackageID &) const
{
return "";
diff --git a/paludis/repositories/fake/fake_repository_base.hh b/paludis/repositories/fake/fake_repository_base.hh
index ae11527..3af5a51 100644
--- a/paludis/repositories/fake/fake_repository_base.hh
+++ b/paludis/repositories/fake/fake_repository_base.hh
@@ -56,60 +56,6 @@ namespace paludis
FakeRepositoryBase(const Environment * const env, const RepositoryName & name,
const RepositoryCapabilities & caps, const std::string &);
- /* RepositoryUseInterface */
-
- virtual UseFlagState do_query_use(const UseFlagName &, const PackageID &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual bool do_query_use_mask(const UseFlagName &, const PackageID &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual bool do_query_use_force(const UseFlagName &, const PackageID &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual tr1::shared_ptr<const UseFlagNameSet> do_arch_flags() const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual tr1::shared_ptr<const UseFlagNameSet> do_use_expand_flags() const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual tr1::shared_ptr<const UseFlagNameSet> do_use_expand_hidden_prefixes() const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual tr1::shared_ptr<const UseFlagNameSet> do_use_expand_prefixes() const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual std::string do_describe_use_flag(const UseFlagName &,
- const PackageID &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- /* RepositorySetsInterface */
-
- virtual tr1::shared_ptr<SetSpecTree::ConstItem> do_package_set(const SetName & id) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual tr1::shared_ptr<const SetNameSet> sets_list() const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- /* Repository */
-
- virtual tr1::shared_ptr<const PackageIDSequence> do_package_ids(
- const QualifiedPackageName &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual tr1::shared_ptr<const QualifiedPackageNameSet> do_package_names(
- const CategoryNamePart &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual tr1::shared_ptr<const CategoryNamePartSet> do_category_names() const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual bool do_has_package_named(const QualifiedPackageName &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual bool do_has_category_named(const CategoryNamePart &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
public:
/**
* Destructor.
@@ -155,6 +101,61 @@ namespace paludis
* Fetch our associated environment.
*/
const Environment * environment() const;
+
+ /* RepositoryUseInterface */
+
+ virtual UseFlagState query_use(const UseFlagName &, const PackageID &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual bool query_use_mask(const UseFlagName &, const PackageID &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual bool query_use_force(const UseFlagName &, const PackageID &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual tr1::shared_ptr<const UseFlagNameSet> arch_flags() const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual tr1::shared_ptr<const UseFlagNameSet> use_expand_flags() const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual tr1::shared_ptr<const UseFlagNameSet> use_expand_hidden_prefixes() const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual tr1::shared_ptr<const UseFlagNameSet> use_expand_prefixes() const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual std::string describe_use_flag(const UseFlagName &,
+ const PackageID &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ /* RepositorySetsInterface */
+
+ virtual tr1::shared_ptr<SetSpecTree::ConstItem> package_set(const SetName & id) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual tr1::shared_ptr<const SetNameSet> sets_list() const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ /* Repository */
+
+ virtual tr1::shared_ptr<const PackageIDSequence> package_ids(
+ const QualifiedPackageName &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual tr1::shared_ptr<const QualifiedPackageNameSet> package_names(
+ const CategoryNamePart &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual tr1::shared_ptr<const CategoryNamePartSet> category_names() const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual bool has_package_named(const QualifiedPackageName &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual bool has_category_named(const CategoryNamePart &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
};
}
diff --git a/paludis/repositories/gems/gems_repository.cc b/paludis/repositories/gems/gems_repository.cc
index 2b9a202..8e9dd2f 100644
--- a/paludis/repositories/gems/gems_repository.cc
+++ b/paludis/repositories/gems/gems_repository.cc
@@ -78,7 +78,6 @@ GemsRepository::GemsRepository(const gems::RepositoryParams & params) :
.virtuals_interface(0)
.provides_interface(0)
.destination_interface(0)
- .licenses_interface(0)
.e_interface(0)
.qa_interface(0)
.make_virtuals_interface(0)
@@ -123,7 +122,7 @@ GemsRepository::invalidate_masks()
}
bool
-GemsRepository::do_has_category_named(const CategoryNamePart & c) const
+GemsRepository::has_category_named(const CategoryNamePart & c) const
{
Lock l(*_imp->big_nasty_mutex);
@@ -132,11 +131,11 @@ GemsRepository::do_has_category_named(const CategoryNamePart & c) const
}
bool
-GemsRepository::do_has_package_named(const QualifiedPackageName & q) const
+GemsRepository::has_package_named(const QualifiedPackageName & q) const
{
Lock l(*_imp->big_nasty_mutex);
- if (! do_has_category_named(q.category))
+ if (! has_category_named(q.category))
return false;
need_ids();
@@ -144,7 +143,7 @@ GemsRepository::do_has_package_named(const QualifiedPackageName & q) const
}
tr1::shared_ptr<const CategoryNamePartSet>
-GemsRepository::do_category_names() const
+GemsRepository::category_names() const
{
Lock l(*_imp->big_nasty_mutex);
@@ -153,7 +152,7 @@ GemsRepository::do_category_names() const
}
tr1::shared_ptr<const QualifiedPackageNameSet>
-GemsRepository::do_package_names(const CategoryNamePart & c) const
+GemsRepository::package_names(const CategoryNamePart & c) const
{
Lock l(*_imp->big_nasty_mutex);
@@ -170,7 +169,7 @@ GemsRepository::do_package_names(const CategoryNamePart & c) const
}
tr1::shared_ptr<const PackageIDSequence>
-GemsRepository::do_package_ids(const QualifiedPackageName & q) const
+GemsRepository::package_ids(const QualifiedPackageName & q) const
{
Lock l(*_imp->big_nasty_mutex);
@@ -301,7 +300,7 @@ namespace
}
bool
-GemsRepository::do_some_ids_might_support_action(const SupportsActionTestBase & a) const
+GemsRepository::some_ids_might_support_action(const SupportsActionTestBase & a) const
{
SupportsActionQuery q;
a.accept(q);
diff --git a/paludis/repositories/gems/gems_repository.hh b/paludis/repositories/gems/gems_repository.hh
index b47d1a5..a387ed0 100644
--- a/paludis/repositories/gems/gems_repository.hh
+++ b/paludis/repositories/gems/gems_repository.hh
@@ -42,28 +42,6 @@ namespace paludis
void need_category_names() const;
void need_ids() const;
- protected:
- /* Repository */
-
- virtual tr1::shared_ptr<const PackageIDSequence> do_package_ids(
- const QualifiedPackageName &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual tr1::shared_ptr<const QualifiedPackageNameSet> do_package_names(
- const CategoryNamePart &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual tr1::shared_ptr<const CategoryNamePartSet> do_category_names() const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual bool do_has_package_named(const QualifiedPackageName &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual bool do_has_category_named(const CategoryNamePart &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual bool do_some_ids_might_support_action(const SupportsActionTestBase &) const;
-
public:
/**
* Constructor.
@@ -78,6 +56,27 @@ namespace paludis
virtual void invalidate();
virtual void invalidate_masks();
+
+ /* Repository */
+
+ virtual tr1::shared_ptr<const PackageIDSequence> package_ids(
+ const QualifiedPackageName &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual tr1::shared_ptr<const QualifiedPackageNameSet> package_names(
+ const CategoryNamePart &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual tr1::shared_ptr<const CategoryNamePartSet> category_names() const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual bool has_package_named(const QualifiedPackageName &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual bool has_category_named(const CategoryNamePart &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual bool some_ids_might_support_action(const SupportsActionTestBase &) const;
};
}
diff --git a/paludis/repositories/gems/installed_gems_repository.cc b/paludis/repositories/gems/installed_gems_repository.cc
index 6e269f6..7ecbc8a 100644
--- a/paludis/repositories/gems/installed_gems_repository.cc
+++ b/paludis/repositories/gems/installed_gems_repository.cc
@@ -87,7 +87,6 @@ InstalledGemsRepository::InstalledGemsRepository(const gems::InstalledRepository
.virtuals_interface(0)
.provides_interface(0)
.destination_interface(this)
- .licenses_interface(0)
.e_interface(0)
.qa_interface(0)
.make_virtuals_interface(0)
@@ -122,7 +121,7 @@ InstalledGemsRepository::invalidate_masks()
}
bool
-InstalledGemsRepository::do_has_category_named(const CategoryNamePart & c) const
+InstalledGemsRepository::has_category_named(const CategoryNamePart & c) const
{
Lock l(*_imp->big_nasty_mutex);
@@ -131,11 +130,11 @@ InstalledGemsRepository::do_has_category_named(const CategoryNamePart & c) const
}
bool
-InstalledGemsRepository::do_has_package_named(const QualifiedPackageName & q) const
+InstalledGemsRepository::has_package_named(const QualifiedPackageName & q) const
{
Lock l(*_imp->big_nasty_mutex);
- if (! do_has_category_named(q.category))
+ if (! has_category_named(q.category))
return false;
need_ids();
@@ -143,7 +142,7 @@ InstalledGemsRepository::do_has_package_named(const QualifiedPackageName & q) co
}
tr1::shared_ptr<const CategoryNamePartSet>
-InstalledGemsRepository::do_category_names() const
+InstalledGemsRepository::category_names() const
{
Lock l(*_imp->big_nasty_mutex);
@@ -152,7 +151,7 @@ InstalledGemsRepository::do_category_names() const
}
tr1::shared_ptr<const QualifiedPackageNameSet>
-InstalledGemsRepository::do_package_names(const CategoryNamePart & c) const
+InstalledGemsRepository::package_names(const CategoryNamePart & c) const
{
Lock l(*_imp->big_nasty_mutex);
@@ -169,7 +168,7 @@ InstalledGemsRepository::do_package_names(const CategoryNamePart & c) const
}
tr1::shared_ptr<const PackageIDSequence>
-InstalledGemsRepository::do_package_ids(const QualifiedPackageName & q) const
+InstalledGemsRepository::package_ids(const QualifiedPackageName & q) const
{
Lock l(*_imp->big_nasty_mutex);
@@ -335,7 +334,7 @@ namespace
}
bool
-InstalledGemsRepository::do_some_ids_might_support_action(const SupportsActionTestBase & a) const
+InstalledGemsRepository::some_ids_might_support_action(const SupportsActionTestBase & a) const
{
SupportsActionQuery q;
a.accept(q);
diff --git a/paludis/repositories/gems/installed_gems_repository.hh b/paludis/repositories/gems/installed_gems_repository.hh
index aa12f01..1b6c2ab 100644
--- a/paludis/repositories/gems/installed_gems_repository.hh
+++ b/paludis/repositories/gems/installed_gems_repository.hh
@@ -44,32 +44,6 @@ namespace paludis
void need_category_names() const;
void need_ids() const;
- protected:
- /* RepositoryInstalledInterface */
-
- virtual FSEntry root() const PALUDIS_ATTRIBUTE((warn_unused_result));
-
- /* Repository */
-
- virtual tr1::shared_ptr<const PackageIDSequence> do_package_ids(
- const QualifiedPackageName &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual tr1::shared_ptr<const QualifiedPackageNameSet> do_package_names(
- const CategoryNamePart &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual tr1::shared_ptr<const CategoryNamePartSet> do_category_names() const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual bool do_has_package_named(const QualifiedPackageName &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual bool do_has_category_named(const CategoryNamePart &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual bool do_some_ids_might_support_action(const SupportsActionTestBase &) const;
-
public:
/**
* Constructor.
@@ -97,6 +71,32 @@ namespace paludis
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual void merge(const MergeOptions &) PALUDIS_ATTRIBUTE((noreturn));
+
+ public:
+ /* RepositoryInstalledInterface */
+
+ virtual FSEntry root() const PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ /* Repository */
+
+ virtual tr1::shared_ptr<const PackageIDSequence> package_ids(
+ const QualifiedPackageName &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual tr1::shared_ptr<const QualifiedPackageNameSet> package_names(
+ const CategoryNamePart &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual tr1::shared_ptr<const CategoryNamePartSet> category_names() const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual bool has_package_named(const QualifiedPackageName &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual bool has_category_named(const CategoryNamePart &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual bool some_ids_might_support_action(const SupportsActionTestBase &) const;
};
}
diff --git a/paludis/repositories/unpackaged/installed_repository.cc b/paludis/repositories/unpackaged/installed_repository.cc
index bca6a4d..61ec67d 100644
--- a/paludis/repositories/unpackaged/installed_repository.cc
+++ b/paludis/repositories/unpackaged/installed_repository.cc
@@ -84,7 +84,6 @@ InstalledUnpackagedRepository::InstalledUnpackagedRepository(
.virtuals_interface(0)
.make_virtuals_interface(0)
.destination_interface(this)
- .licenses_interface(0)
.e_interface(0)
.hook_interface(0)
.qa_interface(0)
@@ -105,7 +104,7 @@ InstalledUnpackagedRepository::~InstalledUnpackagedRepository()
}
tr1::shared_ptr<const PackageIDSequence>
-InstalledUnpackagedRepository::do_package_ids(const QualifiedPackageName & q) const
+InstalledUnpackagedRepository::package_ids(const QualifiedPackageName & q) const
{
tr1::shared_ptr<NDBAMEntrySequence> entries(_imp->ndbam.entries(q));
tr1::shared_ptr<PackageIDSequence> result(new PackageIDSequence);
@@ -124,32 +123,32 @@ InstalledUnpackagedRepository::do_package_ids(const QualifiedPackageName & q) co
}
tr1::shared_ptr<const QualifiedPackageNameSet>
-InstalledUnpackagedRepository::do_package_names(const CategoryNamePart & c) const
+InstalledUnpackagedRepository::package_names(const CategoryNamePart & c) const
{
return _imp->ndbam.package_names(c);
}
tr1::shared_ptr<const CategoryNamePartSet>
-InstalledUnpackagedRepository::do_category_names() const
+InstalledUnpackagedRepository::category_names() const
{
return _imp->ndbam.category_names();
}
tr1::shared_ptr<const CategoryNamePartSet>
-InstalledUnpackagedRepository::do_category_names_containing_package(
+InstalledUnpackagedRepository::category_names_containing_package(
const PackageNamePart & p) const
{
return _imp->ndbam.category_names_containing_package(p);
}
bool
-InstalledUnpackagedRepository::do_has_package_named(const QualifiedPackageName & q) const
+InstalledUnpackagedRepository::has_package_named(const QualifiedPackageName & q) const
{
return _imp->ndbam.has_package_named(q);
}
bool
-InstalledUnpackagedRepository::do_has_category_named(const CategoryNamePart & c) const
+InstalledUnpackagedRepository::has_category_named(const CategoryNamePart & c) const
{
return _imp->ndbam.has_category_named(c);
}
@@ -199,7 +198,7 @@ namespace
}
bool
-InstalledUnpackagedRepository::do_some_ids_might_support_action(const SupportsActionTestBase & test) const
+InstalledUnpackagedRepository::some_ids_might_support_action(const SupportsActionTestBase & test) const
{
SomeIDsMightSupportVisitor v;
test.accept(v);
@@ -336,7 +335,7 @@ InstalledUnpackagedRepository::deindex(const QualifiedPackageName & q) const
}
tr1::shared_ptr<SetSpecTree::ConstItem>
-InstalledUnpackagedRepository::do_package_set(const SetName & s) const
+InstalledUnpackagedRepository::package_set(const SetName & s) const
{
using namespace tr1::placeholders;
diff --git a/paludis/repositories/unpackaged/installed_repository.hh b/paludis/repositories/unpackaged/installed_repository.hh
index 9fc4c25..fc7e722 100644
--- a/paludis/repositories/unpackaged/installed_repository.hh
+++ b/paludis/repositories/unpackaged/installed_repository.hh
@@ -38,33 +38,6 @@ namespace paludis
public RepositoryInstalledInterface,
public RepositorySetsInterface
{
- protected:
- virtual tr1::shared_ptr<const PackageIDSequence> do_package_ids(
- const QualifiedPackageName &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual tr1::shared_ptr<const QualifiedPackageNameSet> do_package_names(
- const CategoryNamePart &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual tr1::shared_ptr<const CategoryNamePartSet> do_category_names() const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual tr1::shared_ptr<const CategoryNamePartSet> do_category_names_containing_package(
- const PackageNamePart &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual bool do_has_package_named(const QualifiedPackageName &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual bool do_has_category_named(const CategoryNamePart &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual bool do_some_ids_might_support_action(const SupportsActionTestBase &) const;
-
- virtual tr1::shared_ptr<SetSpecTree::ConstItem> do_package_set(const SetName & id) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
public:
InstalledUnpackagedRepository(
const RepositoryName &,
@@ -93,6 +66,32 @@ namespace paludis
virtual tr1::shared_ptr<const SetNameSet> sets_list() const
PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual tr1::shared_ptr<const PackageIDSequence> package_ids(
+ const QualifiedPackageName &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual tr1::shared_ptr<const QualifiedPackageNameSet> package_names(
+ const CategoryNamePart &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual tr1::shared_ptr<const CategoryNamePartSet> category_names() const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual tr1::shared_ptr<const CategoryNamePartSet> category_names_containing_package(
+ const PackageNamePart &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual bool has_package_named(const QualifiedPackageName &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual bool has_category_named(const CategoryNamePart &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual bool some_ids_might_support_action(const SupportsActionTestBase &) const;
+
+ virtual tr1::shared_ptr<SetSpecTree::ConstItem> package_set(const SetName & id) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
};
}
diff --git a/paludis/repositories/unpackaged/unpackaged_repository.cc b/paludis/repositories/unpackaged/unpackaged_repository.cc
index 5db3a30..f55d54d 100644
--- a/paludis/repositories/unpackaged/unpackaged_repository.cc
+++ b/paludis/repositories/unpackaged/unpackaged_repository.cc
@@ -74,7 +74,6 @@ UnpackagedRepository::UnpackagedRepository(const RepositoryName & n,
.virtuals_interface(0)
.make_virtuals_interface(0)
.destination_interface(0)
- .licenses_interface(0)
.e_interface(0)
.hook_interface(0)
.qa_interface(0)
@@ -97,43 +96,43 @@ UnpackagedRepository::~UnpackagedRepository()
}
tr1::shared_ptr<const PackageIDSequence>
-UnpackagedRepository::do_package_ids(const QualifiedPackageName & n) const
+UnpackagedRepository::package_ids(const QualifiedPackageName & n) const
{
return n == _imp->id->name() ? _imp->ids : make_shared_ptr(new PackageIDSequence);
}
tr1::shared_ptr<const QualifiedPackageNameSet>
-UnpackagedRepository::do_package_names(const CategoryNamePart & c) const
+UnpackagedRepository::package_names(const CategoryNamePart & c) const
{
return c == _imp->id->name().category ? _imp->package_names : make_shared_ptr(new QualifiedPackageNameSet);
}
tr1::shared_ptr<const CategoryNamePartSet>
-UnpackagedRepository::do_category_names() const
+UnpackagedRepository::category_names() const
{
return _imp->category_names;
}
tr1::shared_ptr<const CategoryNamePartSet>
-UnpackagedRepository::do_category_names_containing_package(const PackageNamePart & p) const
+UnpackagedRepository::category_names_containing_package(const PackageNamePart & p) const
{
return p == _imp->id->name().package ? _imp->category_names : make_shared_ptr(new CategoryNamePartSet);
}
bool
-UnpackagedRepository::do_has_package_named(const QualifiedPackageName & q) const
+UnpackagedRepository::has_package_named(const QualifiedPackageName & q) const
{
return q == _imp->id->name();
}
bool
-UnpackagedRepository::do_has_category_named(const CategoryNamePart & c) const
+UnpackagedRepository::has_category_named(const CategoryNamePart & c) const
{
return c == _imp->id->name().category;
}
bool
-UnpackagedRepository::do_some_ids_might_support_action(const SupportsActionTestBase & test) const
+UnpackagedRepository::some_ids_might_support_action(const SupportsActionTestBase & test) const
{
return _imp->id->supports_action(test);
}
diff --git a/paludis/repositories/unpackaged/unpackaged_repository.hh b/paludis/repositories/unpackaged/unpackaged_repository.hh
index 40853e6..8ff1639 100644
--- a/paludis/repositories/unpackaged/unpackaged_repository.hh
+++ b/paludis/repositories/unpackaged/unpackaged_repository.hh
@@ -35,39 +35,38 @@ namespace paludis
private PrivateImplementationPattern<UnpackagedRepository>,
public Repository
{
- protected:
- virtual tr1::shared_ptr<const PackageIDSequence> do_package_ids(
+ public:
+ UnpackagedRepository(
+ const RepositoryName &,
+ const unpackaged_repositories::UnpackagedRepositoryParams &);
+
+ ~UnpackagedRepository();
+
+ virtual void invalidate();
+ virtual void invalidate_masks();
+
+ virtual tr1::shared_ptr<const PackageIDSequence> package_ids(
const QualifiedPackageName &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const QualifiedPackageNameSet> do_package_names(
+ virtual tr1::shared_ptr<const QualifiedPackageNameSet> package_names(
const CategoryNamePart &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const CategoryNamePartSet> do_category_names() const
+ virtual tr1::shared_ptr<const CategoryNamePartSet> category_names() const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const CategoryNamePartSet> do_category_names_containing_package(
+ virtual tr1::shared_ptr<const CategoryNamePartSet> category_names_containing_package(
const PackageNamePart &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual bool do_has_package_named(const QualifiedPackageName &) const
+ virtual bool has_package_named(const QualifiedPackageName &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual bool do_has_category_named(const CategoryNamePart &) const
+ virtual bool has_category_named(const CategoryNamePart &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual bool do_some_ids_might_support_action(const SupportsActionTestBase &) const;
-
- public:
- UnpackagedRepository(
- const RepositoryName &,
- const unpackaged_repositories::UnpackagedRepositoryParams &);
-
- ~UnpackagedRepository();
-
- virtual void invalidate();
- virtual void invalidate_masks();
+ virtual bool some_ids_might_support_action(const SupportsActionTestBase &) const;
};
}
diff --git a/paludis/repositories/virtuals/installed_virtuals_repository.cc b/paludis/repositories/virtuals/installed_virtuals_repository.cc
index fff9ffa..4b7f176 100644
--- a/paludis/repositories/virtuals/installed_virtuals_repository.cc
+++ b/paludis/repositories/virtuals/installed_virtuals_repository.cc
@@ -113,7 +113,6 @@ InstalledVirtualsRepository::InstalledVirtualsRepository(const Environment * con
.provides_interface(0)
.virtuals_interface(0)
.destination_interface(0)
- .licenses_interface(0)
.e_interface(0)
.make_virtuals_interface(0)
.qa_interface(0)
@@ -185,7 +184,7 @@ InstalledVirtualsRepository::make_installed_virtuals_repository(
}
tr1::shared_ptr<const PackageIDSequence>
-InstalledVirtualsRepository::do_package_ids(const QualifiedPackageName & q) const
+InstalledVirtualsRepository::package_ids(const QualifiedPackageName & q) const
{
if (q.category.data() != "virtual")
return tr1::shared_ptr<PackageIDSequence>(new PackageIDSequence);
@@ -200,7 +199,7 @@ InstalledVirtualsRepository::do_package_ids(const QualifiedPackageName & q) cons
}
tr1::shared_ptr<const QualifiedPackageNameSet>
-InstalledVirtualsRepository::do_package_names(const CategoryNamePart & c) const
+InstalledVirtualsRepository::package_names(const CategoryNamePart & c) const
{
if (c.data() != "virtual")
return tr1::shared_ptr<QualifiedPackageNameSet>(new QualifiedPackageNameSet);
@@ -215,7 +214,7 @@ InstalledVirtualsRepository::do_package_names(const CategoryNamePart & c) const
}
tr1::shared_ptr<const CategoryNamePartSet>
-InstalledVirtualsRepository::do_category_names() const
+InstalledVirtualsRepository::category_names() const
{
tr1::shared_ptr<CategoryNamePartSet> result(new CategoryNamePartSet);
result->insert(CategoryNamePart("virtual"));
@@ -223,7 +222,7 @@ InstalledVirtualsRepository::do_category_names() const
}
bool
-InstalledVirtualsRepository::do_has_package_named(const QualifiedPackageName & q) const
+InstalledVirtualsRepository::has_package_named(const QualifiedPackageName & q) const
{
if (q.category.data() != "virtual")
return false;
@@ -234,7 +233,7 @@ InstalledVirtualsRepository::do_has_package_named(const QualifiedPackageName & q
}
bool
-InstalledVirtualsRepository::do_has_category_named(const CategoryNamePart & c) const
+InstalledVirtualsRepository::has_category_named(const CategoryNamePart & c) const
{
return (c.data() == "virtual");
}
@@ -265,12 +264,6 @@ InstalledVirtualsRepository::perform_hook(const Hook & hook) const
return HookResult(0, "");
}
-time_t
-InstalledVirtualsRepository::do_installed_time(const PackageID &) const
-{
- return 0;
-}
-
bool
InstalledVirtualsRepository::can_be_favourite_repository() const
{
@@ -321,7 +314,7 @@ namespace
}
bool
-InstalledVirtualsRepository::do_some_ids_might_support_action(const SupportsActionTestBase & a) const
+InstalledVirtualsRepository::some_ids_might_support_action(const SupportsActionTestBase & a) const
{
SupportsActionQuery q;
a.accept(q);
diff --git a/paludis/repositories/virtuals/installed_virtuals_repository.hh b/paludis/repositories/virtuals/installed_virtuals_repository.hh
index 513d697..917a420 100644
--- a/paludis/repositories/virtuals/installed_virtuals_repository.hh
+++ b/paludis/repositories/virtuals/installed_virtuals_repository.hh
@@ -42,32 +42,6 @@ namespace paludis
private:
void need_ids() const;
- protected:
- /* RepositoryInstalledInterface */
-
- virtual time_t do_installed_time(const PackageID &) const;
-
- /* Repository */
-
- virtual tr1::shared_ptr<const PackageIDSequence> do_package_ids(
- const QualifiedPackageName &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual tr1::shared_ptr<const QualifiedPackageNameSet> do_package_names(
- const CategoryNamePart &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual tr1::shared_ptr<const CategoryNamePartSet> do_category_names() const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual bool do_has_package_named(const QualifiedPackageName &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual bool do_has_category_named(const CategoryNamePart &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual bool do_some_ids_might_support_action(const SupportsActionTestBase &) const;
-
public:
///\name Basic operations
//\{
@@ -98,6 +72,28 @@ namespace paludis
HookResult perform_hook(const Hook &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ /* Repository */
+
+ virtual tr1::shared_ptr<const PackageIDSequence> package_ids(
+ const QualifiedPackageName &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual tr1::shared_ptr<const QualifiedPackageNameSet> package_names(
+ const CategoryNamePart &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual tr1::shared_ptr<const CategoryNamePartSet> category_names() const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual bool has_package_named(const QualifiedPackageName &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual bool has_category_named(const CategoryNamePart &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual bool some_ids_might_support_action(const SupportsActionTestBase &) const;
+
};
}
diff --git a/paludis/repositories/virtuals/virtuals_repository.cc b/paludis/repositories/virtuals/virtuals_repository.cc
index a9424ad..3a448b6 100644
--- a/paludis/repositories/virtuals/virtuals_repository.cc
+++ b/paludis/repositories/virtuals/virtuals_repository.cc
@@ -123,7 +123,6 @@ VirtualsRepository::VirtualsRepository(const Environment * const env) :
.provides_interface(0)
.virtuals_interface(0)
.destination_interface(0)
- .licenses_interface(0)
.e_interface(0)
.make_virtuals_interface(this)
.qa_interface(0)
@@ -258,7 +257,7 @@ VirtualsRepository::make_virtuals_repository(
}
tr1::shared_ptr<const PackageIDSequence>
-VirtualsRepository::do_package_ids(const QualifiedPackageName & q) const
+VirtualsRepository::package_ids(const QualifiedPackageName & q) const
{
if (q.category.data() != "virtual")
return tr1::shared_ptr<PackageIDSequence>(new PackageIDSequence);
@@ -273,7 +272,7 @@ VirtualsRepository::do_package_ids(const QualifiedPackageName & q) const
}
tr1::shared_ptr<const QualifiedPackageNameSet>
-VirtualsRepository::do_package_names(const CategoryNamePart & c) const
+VirtualsRepository::package_names(const CategoryNamePart & c) const
{
if (c.data() != "virtual")
return tr1::shared_ptr<QualifiedPackageNameSet>(new QualifiedPackageNameSet);
@@ -288,7 +287,7 @@ VirtualsRepository::do_package_names(const CategoryNamePart & c) const
}
tr1::shared_ptr<const CategoryNamePartSet>
-VirtualsRepository::do_category_names() const
+VirtualsRepository::category_names() const
{
tr1::shared_ptr<CategoryNamePartSet> result(new CategoryNamePartSet);
result->insert(CategoryNamePart("virtual"));
@@ -296,7 +295,7 @@ VirtualsRepository::do_category_names() const
}
bool
-VirtualsRepository::do_has_package_named(const QualifiedPackageName & q) const
+VirtualsRepository::has_package_named(const QualifiedPackageName & q) const
{
if (q.category.data() != "virtual")
return false;
@@ -314,7 +313,7 @@ VirtualsRepository::do_has_package_named(const QualifiedPackageName & q) const
}
bool
-VirtualsRepository::do_has_category_named(const CategoryNamePart & c) const
+VirtualsRepository::has_category_named(const CategoryNamePart & c) const
{
return (c.data() == "virtual");
}
@@ -399,7 +398,7 @@ namespace
}
bool
-VirtualsRepository::do_some_ids_might_support_action(const SupportsActionTestBase & a) const
+VirtualsRepository::some_ids_might_support_action(const SupportsActionTestBase & a) const
{
SupportsActionQuery q;
a.accept(q);
diff --git a/paludis/repositories/virtuals/virtuals_repository.hh b/paludis/repositories/virtuals/virtuals_repository.hh
index affd769..4a7ca33 100644
--- a/paludis/repositories/virtuals/virtuals_repository.hh
+++ b/paludis/repositories/virtuals/virtuals_repository.hh
@@ -41,34 +41,6 @@ namespace paludis
void need_names() const;
void need_ids() const;
- protected:
- /* Repository */
-
- virtual tr1::shared_ptr<const PackageIDSequence> do_package_ids(
- const QualifiedPackageName &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual tr1::shared_ptr<const QualifiedPackageNameSet> do_package_names(
- const CategoryNamePart &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual tr1::shared_ptr<const CategoryNamePartSet> do_category_names() const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual bool do_has_package_named(const QualifiedPackageName &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual bool do_has_category_named(const CategoryNamePart &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual bool do_some_ids_might_support_action(const SupportsActionTestBase &) const;
-
- /* RepositoryMakeVirtualsInterface */
-
- virtual const tr1::shared_ptr<const PackageID> make_virtual_package_id(
- const QualifiedPackageName & virtual_name, const tr1::shared_ptr<const PackageID> & provider) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
public:
///\name Basic operations
///\{
@@ -93,6 +65,34 @@ namespace paludis
virtual void invalidate_masks();
virtual bool can_be_favourite_repository() const;
+
+ /* Repository */
+
+ virtual tr1::shared_ptr<const PackageIDSequence> package_ids(
+ const QualifiedPackageName &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual tr1::shared_ptr<const QualifiedPackageNameSet> package_names(
+ const CategoryNamePart &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual tr1::shared_ptr<const CategoryNamePartSet> category_names() const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual bool has_package_named(const QualifiedPackageName &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual bool has_category_named(const CategoryNamePart &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual bool some_ids_might_support_action(const SupportsActionTestBase &) const;
+
+ /* RepositoryMakeVirtualsInterface */
+
+ virtual const tr1::shared_ptr<const PackageID> make_virtual_package_id(
+ const QualifiedPackageName & virtual_name, const tr1::shared_ptr<const PackageID> & provider) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
};
}
diff --git a/paludis/repository-fwd.hh b/paludis/repository-fwd.hh
index 4651a64..cee6ced 100644
--- a/paludis/repository-fwd.hh
+++ b/paludis/repository-fwd.hh
@@ -52,7 +52,6 @@ namespace paludis
class RepositoryVirtualsInterface;
class RepositoryMakeVirtualsInterface;
class RepositoryDestinationInterface;
- class RepositoryLicensesInterface;
class RepositoryEInterface;
class RepositoryHookInterface;
class RepositoryQAInterface;
diff --git a/paludis/repository.cc b/paludis/repository.cc
index 5cbec3b..998d13e 100644
--- a/paludis/repository.cc
+++ b/paludis/repository.cc
@@ -116,7 +116,7 @@ Repository::info(bool) const
}
tr1::shared_ptr<const CategoryNamePartSet>
-Repository::do_category_names_containing_package(const PackageNamePart & p) const
+Repository::category_names_containing_package(const PackageNamePart & p) const
{
Context context("When finding category names containing package '" + stringify(p) + "':");
@@ -181,10 +181,6 @@ RepositoryDestinationInterface::~RepositoryDestinationInterface()
{
}
-RepositoryLicensesInterface::~RepositoryLicensesInterface()
-{
-}
-
RepositoryEInterface::~RepositoryEInterface()
{
}
@@ -205,128 +201,21 @@ RepositoryManifestInterface::~RepositoryManifestInterface()
{
}
-tr1::shared_ptr<FSEntry>
-RepositoryLicensesInterface::license_exists(const std::string & license) const
-{
- return do_license_exists(license);
-}
-
-UseFlagState
-RepositoryUseInterface::query_use(const UseFlagName & u, const PackageID & pde) const
-{
- if (do_query_use_mask(u, pde))
- return use_disabled;
- else if (do_query_use_force(u, pde))
- return use_enabled;
- else
- return do_query_use(u, pde);
-}
-
-bool
-RepositoryUseInterface::query_use_mask(const UseFlagName & u, const PackageID & pde) const
-{
- return do_query_use_mask(u, pde);
-}
-
-bool
-RepositoryUseInterface::query_use_force(const UseFlagName & u, const PackageID & pde) const
-{
- return do_query_use_force(u, pde);
-}
-
-tr1::shared_ptr<const UseFlagNameSet>
-RepositoryUseInterface::arch_flags() const
-{
- return do_arch_flags();
-}
-
-tr1::shared_ptr<const UseFlagNameSet>
-RepositoryUseInterface::use_expand_flags() const
-{
- return do_use_expand_flags();
-}
-
-tr1::shared_ptr<const UseFlagNameSet>
-RepositoryUseInterface::use_expand_hidden_prefixes() const
-{
- return do_use_expand_hidden_prefixes();
-}
-
-tr1::shared_ptr<const UseFlagNameSet>
-RepositoryUseInterface::use_expand_prefixes() const
-{
- return do_use_expand_prefixes();
-}
-
-std::string
-RepositoryUseInterface::describe_use_flag(const UseFlagName & n, const PackageID & pkg) const
-{
- return do_describe_use_flag(n, pkg);
-}
-
bool
RepositoryMirrorsInterface::is_mirror(const std::string & s) const
{
return begin_mirrors(s) != end_mirrors(s);
}
-tr1::shared_ptr<const PackageIDSequence>
-Repository::package_ids(const QualifiedPackageName & p) const
-{
- return do_package_ids(p);
-}
-
bool
Repository::can_be_favourite_repository() const
{
return true;
}
-bool
-Repository::has_package_named(const QualifiedPackageName & q) const
-{
- return do_has_package_named(q);
-}
-
-bool
-Repository::has_category_named(const CategoryNamePart & q) const
-{
- return do_has_category_named(q);
-}
-
-tr1::shared_ptr<const CategoryNamePartSet>
-Repository::category_names_containing_package(const PackageNamePart & p) const
-{
- return do_category_names_containing_package(p);
-}
-
-tr1::shared_ptr<const QualifiedPackageNameSet>
-Repository::package_names(const CategoryNamePart & c) const
-{
- return do_package_names(c);
-}
-
-tr1::shared_ptr<const CategoryNamePartSet>
-Repository::category_names() const
-{
- return do_category_names();
-}
-
tr1::shared_ptr<const CategoryNamePartSet>
Repository::unimportant_category_names() const
{
return make_shared_ptr(new CategoryNamePartSet);
}
-bool
-RepositorySyncableInterface::sync() const
-{
- return do_sync();
-}
-
-bool
-Repository::some_ids_might_support_action(const SupportsActionTestBase & b) const
-{
- return do_some_ids_might_support_action(b);
-}
-
diff --git a/paludis/repository.hh b/paludis/repository.hh
index 792c72a..375f204 100644
--- a/paludis/repository.hh
+++ b/paludis/repository.hh
@@ -155,61 +155,6 @@ namespace paludis
///\}
- /**
- * \name Implementations: navigation functions
- *
- * These are implemented in subclasses to handle navigation queries.
- */
- ///\{
-
- /**
- * Override in descendents: fetch package IDs.
- */
- virtual tr1::shared_ptr<const PackageIDSequence> do_package_ids(
- const QualifiedPackageName &) const
- PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
-
- /**
- * Override in descendents: fetch package names.
- */
- virtual tr1::shared_ptr<const QualifiedPackageNameSet> do_package_names(
- const CategoryNamePart &) const
- PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
-
- /**
- * Override in descendents: fetch category names.
- */
- virtual tr1::shared_ptr<const CategoryNamePartSet> do_category_names() const
- PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
-
- /**
- * Override in descendents if a fast implementation is available: fetch category names
- * that contain a particular package.
- */
- virtual tr1::shared_ptr<const CategoryNamePartSet> do_category_names_containing_package(
- const PackageNamePart &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- /**
- * Override in descendents: check for a package.
- */
- virtual bool do_has_package_named(const QualifiedPackageName &) const
- PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
-
- /**
- * Override in descendents: check for a category.
- */
- virtual bool do_has_category_named(const CategoryNamePart &) const
- PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
-
- /**
- * Override in descendents: might some of our IDs support a
- * particular action?
- */
- virtual bool do_some_ids_might_support_action(const SupportsActionTestBase &) const = 0;
-
- ///\}
-
public:
///\name Basic operations
///\{
@@ -252,17 +197,17 @@ namespace paludis
/**
* Do we have a category with the given name?
*/
- bool has_category_named(const CategoryNamePart & c) const;
+ virtual bool has_category_named(const CategoryNamePart & c) const = 0;
/**
* Do we have a package in the given category with the given name?
*/
- bool has_package_named(const QualifiedPackageName & q) const;
+ virtual bool has_package_named(const QualifiedPackageName & q) const = 0;
/**
* Fetch our category names.
*/
- tr1::shared_ptr<const CategoryNamePartSet> category_names() const;
+ virtual tr1::shared_ptr<const CategoryNamePartSet> category_names() const = 0;
/**
* Fetch unimportant categories.
@@ -272,19 +217,19 @@ namespace paludis
/**
* Fetch categories that contain a named package.
*/
- tr1::shared_ptr<const CategoryNamePartSet> category_names_containing_package(
+ virtual tr1::shared_ptr<const CategoryNamePartSet> category_names_containing_package(
const PackageNamePart & p) const;
/**
* Fetch our package names.
*/
- tr1::shared_ptr<const QualifiedPackageNameSet> package_names(
- const CategoryNamePart & c) const;
+ virtual tr1::shared_ptr<const QualifiedPackageNameSet> package_names(
+ const CategoryNamePart & c) const = 0;
/**
* Fetch our IDs.
*/
- tr1::shared_ptr<const PackageIDSequence> package_ids(const QualifiedPackageName & p) const;
+ virtual tr1::shared_ptr<const PackageIDSequence> package_ids(const QualifiedPackageName & p) const = 0;
/**
* Might some of our IDs support a particular action?
@@ -293,7 +238,7 @@ namespace paludis
* support, say, InstallAction, a query can skip searching it
* entirely when looking for installable packages.
*/
- bool some_ids_might_support_action(const SupportsActionTestBase &) const;
+ virtual bool some_ids_might_support_action(const SupportsActionTestBase &) const = 0;
///\}
@@ -328,61 +273,6 @@ namespace paludis
*/
class PALUDIS_VISIBLE RepositoryUseInterface
{
- protected:
- ///\name Implementation details
- ///\{
-
- /**
- * Override in descendents: get use.
- */
- virtual UseFlagState do_query_use(const UseFlagName &, const PackageID &) const
- PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
-
- /**
- * Override in descendents: get use mask.
- */
- virtual bool do_query_use_mask(const UseFlagName &, const PackageID &) const
- PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
-
- /**
- * Override in descendents: get use force.
- */
- virtual bool do_query_use_force(const UseFlagName &, const PackageID &) const
- PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
-
- /**
- * Override in descendents: fetch all arch flags.
- */
- virtual tr1::shared_ptr<const UseFlagNameSet> do_arch_flags() const
- PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
-
- /**
- * Override in descendents: fetch all use expand flags.
- */
- virtual tr1::shared_ptr<const UseFlagNameSet> do_use_expand_flags() const
- PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
-
- /**
- * Override in descendents: fetch all use expand hidden prefixes.
- */
- virtual tr1::shared_ptr<const UseFlagNameSet> do_use_expand_hidden_prefixes() const
- PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
-
- /**
- * Override in descendents: fetch all use expand prefixes.
- */
- virtual tr1::shared_ptr<const UseFlagNameSet> do_use_expand_prefixes() const
- PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
-
- /**
- * Override in descendents: describe a use flag.
- */
- virtual std::string do_describe_use_flag(const UseFlagName &,
- const PackageID &) const
- PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
-
- ///\}
-
public:
///\name USE queries
///\{
@@ -390,43 +280,42 @@ namespace paludis
/**
* Query the state of the specified use flag.
*/
- UseFlagState query_use(const UseFlagName & u, const PackageID &) const;
+ virtual UseFlagState query_use(const UseFlagName & u, const PackageID &) const = 0;
/**
* Query whether the specified use flag is masked.
*/
- bool query_use_mask(const UseFlagName & u, const PackageID & pde) const;
+ virtual bool query_use_mask(const UseFlagName & u, const PackageID & pde) const = 0;
/**
* Query whether the specified use flag is forced.
*/
- bool query_use_force(const UseFlagName & u, const PackageID & pde) const;
+ virtual bool query_use_force(const UseFlagName & u, const PackageID & pde) const = 0;
/**
* Fetch all arch flags.
*/
- tr1::shared_ptr<const UseFlagNameSet> arch_flags() const;
+ virtual tr1::shared_ptr<const UseFlagNameSet> arch_flags() const = 0;
/**
* Fetch all expand flags.
*/
- tr1::shared_ptr<const UseFlagNameSet> use_expand_flags() const;
+ virtual tr1::shared_ptr<const UseFlagNameSet> use_expand_flags() const = 0;
/**
* Fetch all expand hidden flags.
*/
- tr1::shared_ptr<const UseFlagNameSet> use_expand_hidden_prefixes() const;
+ virtual tr1::shared_ptr<const UseFlagNameSet> use_expand_hidden_prefixes() const = 0;
/**
* Fetch all use expand prefixes.
*/
- tr1::shared_ptr<const UseFlagNameSet> use_expand_prefixes() const;
+ virtual tr1::shared_ptr<const UseFlagNameSet> use_expand_prefixes() const = 0;
/**
* Describe a use flag.
*/
- std::string describe_use_flag(const UseFlagName & n,
- const PackageID & pkg) const;
+ virtual std::string describe_use_flag(const UseFlagName & n, const PackageID & pkg) const = 0;
///\}
@@ -466,18 +355,6 @@ namespace paludis
*/
class PALUDIS_VISIBLE RepositorySetsInterface
{
- protected:
- ///\name Implementation details
- ///\{
-
- /**
- * Override in descendents: package list.
- */
- virtual tr1::shared_ptr<SetSpecTree::ConstItem> do_package_set(const SetName & id) const
- PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
-
- ///\}
-
public:
///\name Set queries
///\{
@@ -485,10 +362,7 @@ namespace paludis
/**
* Fetch a package set.
*/
- tr1::shared_ptr<SetSpecTree::ConstItem> package_set(const SetName & s) const
- {
- return do_package_set(s);
- }
+ virtual tr1::shared_ptr<SetSpecTree::ConstItem> package_set(const SetName & s) const = 0;
/**
* Gives a list of the names of all the sets provided by this repo.
@@ -510,17 +384,6 @@ namespace paludis
*/
class PALUDIS_VISIBLE RepositorySyncableInterface
{
- protected:
- ///\name Implementation details
- ///\{
-
- /**
- * Override in descendents: sync, if needed (true) or do nothing (false).
- */
- virtual bool do_sync() const = 0;
-
- ///\}
-
public:
///\name Sync functions
///\{
@@ -530,7 +393,7 @@ namespace paludis
*
* \return True if we synced successfully, false if we skipped sync.
*/
- bool sync() const;
+ virtual bool sync() const = 0;
///\}
@@ -753,43 +616,6 @@ namespace paludis
virtual ~RepositoryDestinationInterface();
};
- /**
- * Interface for handling actions relating to licenses.
- *
- * \see Repository
- * \ingroup g_repository
- * \nosubgrouping
- */
- class PALUDIS_VISIBLE RepositoryLicensesInterface
- {
- protected:
- ///\name Implementation details
- ///\{
-
- /**
- * Override in descendents: do the actual check,
- */
- virtual tr1::shared_ptr<FSEntry>
- do_license_exists(const std::string & license) const
- PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
-
- ///\}
-
- public:
- ///\name License related queries
- ///\{
-
- /**
- * Check if a license exists
- */
- tr1::shared_ptr<FSEntry>
- license_exists(const std::string & license) const;
-
- ///\}
-
- virtual ~RepositoryLicensesInterface();
- };
-
class ERepositoryParams;
/**
diff --git a/paludis/repository.sr b/paludis/repository.sr
index c6f0664..a5a4e73 100644
--- a/paludis/repository.sr
+++ b/paludis/repository.sr
@@ -16,7 +16,6 @@ make_class_RepositoryCapabilities()
key virtuals_interface "RepositoryVirtualsInterface *"
key make_virtuals_interface "RepositoryMakeVirtualsInterface *"
key destination_interface "RepositoryDestinationInterface *"
- key licenses_interface "RepositoryLicensesInterface *"
key e_interface "RepositoryEInterface *"
key hook_interface "RepositoryHookInterface *"
key qa_interface "RepositoryQAInterface *"
diff --git a/python/repository.cc b/python/repository.cc
index 1bd540a..4d2186c 100644
--- a/python/repository.cc
+++ b/python/repository.cc
@@ -108,12 +108,6 @@ struct RepositoryWrapper :
return self.destination_interface;
}
- static RepositoryLicensesInterface *
- get_licenses_interface(const Repository & self)
- {
- return self.licenses_interface;
- }
-
static RepositoryEInterface *
get_e_interface(const Repository & self)
{
@@ -136,19 +130,6 @@ struct FakeRepositoryWrapper
}
};
-struct RepositoryLicensesInterfaceWrapper
-{
- static PyObject *
- license_exists(const RepositoryLicensesInterface & self, const std::string & license)
- {
- tr1::shared_ptr<FSEntry> p(self.license_exists(license));
- if (p)
- return to_string<FSEntry>::convert(*p);
- else
- return 0;
- }
-};
-
struct RepositoryEInterfaceWrapper
{
static bp::object
@@ -337,11 +318,6 @@ void expose_repository()
"[ro] RepositoryDestinationInterface"
)
- .add_property("licenses_interface", bp::make_function(&RepositoryWrapper::get_licenses_interface,
- bp::return_internal_reference<>()),
- "[ro] RepositoryLicensesInterface"
- )
-
.add_property("e_interface", bp::make_function(&RepositoryWrapper::get_e_interface,
bp::return_internal_reference<>()),
"[ro] RepositoryEInterface"
@@ -500,21 +476,6 @@ void expose_repository()
);
/**
- * RepositoryLicensesInterface
- */
- bp::class_<RepositoryLicensesInterface, boost::noncopyable>
- (
- "RepositoryLicensesInterface",
- "Interface for handling actions relating to licenses.",
- bp::no_init
- )
- .def("license_exists", &RepositoryLicensesInterfaceWrapper::license_exists,
- "license_exists(string) -> path_string or None\n"
- "Check if a license exists."
- )
- ;
-
- /**
* RepositoryEInterface
*/
bp::class_<RepositoryEInterface, boost::noncopyable>
diff --git a/python/repository_TEST.py b/python/repository_TEST.py
index 6daddb1..aad3ab5 100755
--- a/python/repository_TEST.py
+++ b/python/repository_TEST.py
@@ -176,13 +176,6 @@ class TestCase_02_RepositoryInterfaces(unittest.TestCase):
di = irepo.destination_interface
self.assert_(isinstance(di, RepositoryDestinationInterface))
- def test_11_licenses_interface(self):
- li = repo.licenses_interface
- self.assert_(isinstance(li, RepositoryLicensesInterface))
-
- self.assertEquals(os.path.realpath(li.license_exists("foo")), os.path.join(repo_path, "licenses/foo"))
- self.assertEquals(li.license_exists("bad"), None)
-
def test_12_e_interface(self):
ei = nce.main_repository.e_interface