aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e
diff options
context:
space:
mode:
authorAvatar Paul Mulders <info@mld.demon.nl> 2010-03-11 18:29:40 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-03-11 17:39:59 +0000
commit9f50693474e974ecdf7fd0f02f358c4e50858d27 (patch)
tree5240ebada8380e0625e8bcc0b3ae28f461895b5f /paludis/repositories/e
parentef5d3ecffec6ee97bbd213fbc5569de904191aed (diff)
downloadpaludis-9f50693474e974ecdf7fd0f02f358c4e50858d27.tar.gz
paludis-9f50693474e974ecdf7fd0f02f358c4e50858d27.tar.xz
Add is_unimportant() to Repositories
Only returns true for UnwrittenRepositories and UnavailableRepositories for now, to be used in disambiguation
Diffstat (limited to 'paludis/repositories/e')
-rw-r--r--paludis/repositories/e/e_installed_repository.cc6
-rw-r--r--paludis/repositories/e/e_installed_repository.hh2
-rw-r--r--paludis/repositories/e/e_repository.cc6
-rw-r--r--paludis/repositories/e/e_repository.hh1
-rw-r--r--paludis/repositories/e/exndbam_repository.cc6
-rw-r--r--paludis/repositories/e/exndbam_repository.hh2
-rw-r--r--paludis/repositories/e/vdb_repository.cc6
-rw-r--r--paludis/repositories/e/vdb_repository.hh2
8 files changed, 31 insertions, 0 deletions
diff --git a/paludis/repositories/e/e_installed_repository.cc b/paludis/repositories/e/e_installed_repository.cc
index 38af704db..e11f9e806 100644
--- a/paludis/repositories/e/e_installed_repository.cc
+++ b/paludis/repositories/e/e_installed_repository.cc
@@ -162,6 +162,12 @@ EInstalledRepository::perform_hook(const Hook & hook)
return make_named_values<HookResult>(value_for<n::max_exit_status>(0), value_for<n::output>(""));
}
+const bool
+EInstalledRepository::is_unimportant() const
+{
+ return false;
+}
+
std::tr1::shared_ptr<const CategoryNamePartSet>
EInstalledRepository::unimportant_category_names() const
{
diff --git a/paludis/repositories/e/e_installed_repository.hh b/paludis/repositories/e/e_installed_repository.hh
index b9c92ba90..9c6d9dba7 100644
--- a/paludis/repositories/e/e_installed_repository.hh
+++ b/paludis/repositories/e/e_installed_repository.hh
@@ -77,6 +77,8 @@ namespace paludis
virtual std::tr1::shared_ptr<const CategoryNamePartSet> unimportant_category_names() const;
+ virtual const bool is_unimportant() const;
+
virtual bool some_ids_might_support_action(const SupportsActionTestBase &) const;
HookResult perform_hook(const Hook & hook)
diff --git a/paludis/repositories/e/e_repository.cc b/paludis/repositories/e/e_repository.cc
index 50065104a..edfa25973 100644
--- a/paludis/repositories/e/e_repository.cc
+++ b/paludis/repositories/e/e_repository.cc
@@ -981,6 +981,12 @@ ERepository::unimportant_category_names() const
return result;
}
+const bool
+ERepository::is_unimportant() const
+{
+ return false;
+}
+
namespace
{
struct SupportsActionQuery
diff --git a/paludis/repositories/e/e_repository.hh b/paludis/repositories/e/e_repository.hh
index af0fddfc7..32964774d 100644
--- a/paludis/repositories/e/e_repository.hh
+++ b/paludis/repositories/e/e_repository.hh
@@ -150,6 +150,7 @@ namespace paludis
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual std::tr1::shared_ptr<const CategoryNamePartSet> unimportant_category_names() const;
+ virtual const bool is_unimportant() const;
/**
* Update GLEP 42 news files.
diff --git a/paludis/repositories/e/exndbam_repository.cc b/paludis/repositories/e/exndbam_repository.cc
index 0cd9a7788..ad4fc4c10 100644
--- a/paludis/repositories/e/exndbam_repository.cc
+++ b/paludis/repositories/e/exndbam_repository.cc
@@ -255,6 +255,12 @@ ExndbamRepository::has_category_named(const CategoryNamePart & c) const
return _imp->ndbam.has_category_named(c);
}
+const bool
+ExndbamRepository::is_unimportant() const
+{
+ return false;
+}
+
ExndbamRepositoryConfigurationError::ExndbamRepositoryConfigurationError(
const std::string & msg) throw () :
ConfigurationError("Exndbam repository configuration error: " + msg)
diff --git a/paludis/repositories/e/exndbam_repository.hh b/paludis/repositories/e/exndbam_repository.hh
index aa2f6b7e2..fea14ee64 100644
--- a/paludis/repositories/e/exndbam_repository.hh
+++ b/paludis/repositories/e/exndbam_repository.hh
@@ -108,6 +108,8 @@ namespace paludis
virtual bool has_category_named(const CategoryNamePart &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
+ virtual const bool is_unimportant() const;
+
/* Keys */
virtual const std::tr1::shared_ptr<const MetadataValueKey<std::string> > format_key() const;
diff --git a/paludis/repositories/e/vdb_repository.cc b/paludis/repositories/e/vdb_repository.cc
index 35c4b45d0..9509293d5 100644
--- a/paludis/repositories/e/vdb_repository.cc
+++ b/paludis/repositories/e/vdb_repository.cc
@@ -231,6 +231,12 @@ VDBRepository::has_package_named(const QualifiedPackageName & q) const
return cat_iter->second->end() != cat_iter->second->find(q);
}
+const bool
+VDBRepository::is_unimportant() const
+{
+ return false;
+}
+
std::tr1::shared_ptr<const CategoryNamePartSet>
VDBRepository::category_names() const
{
diff --git a/paludis/repositories/e/vdb_repository.hh b/paludis/repositories/e/vdb_repository.hh
index f1a682ac7..e72edf610 100644
--- a/paludis/repositories/e/vdb_repository.hh
+++ b/paludis/repositories/e/vdb_repository.hh
@@ -157,6 +157,8 @@ namespace paludis
virtual bool has_category_named(const CategoryNamePart &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
+ virtual const bool is_unimportant() const;
+
/* Keys */
virtual const std::tr1::shared_ptr<const MetadataValueKey<std::string> > format_key() const;
virtual const std::tr1::shared_ptr<const MetadataValueKey<FSEntry> > location_key() const;