aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2008-01-26 17:12:15 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2008-01-26 17:12:15 +0000
commit8942ed1819f3a4fa88490c5b6e4bbde2d608a944 (patch)
tree45d36abd567e95069a8858bf325900ea2e8cea75
parent12322ebcd781f046dbba98c2d38f81fb94459041 (diff)
downloadpaludis-8942ed1819f3a4fa88490c5b6e4bbde2d608a944.tar.gz
paludis-8942ed1819f3a4fa88490c5b6e4bbde2d608a944.tar.xz
Add eclass_keywords metadata key.
-rw-r--r--paludis/repositories/e/e_repository_id.hh1
-rw-r--r--paludis/repositories/e/ebuild.cc3
-rw-r--r--paludis/repositories/e/ebuild_id.cc16
-rw-r--r--paludis/repositories/e/ebuild_id.hh2
-rw-r--r--paludis/repositories/e/vdb_id.cc6
-rw-r--r--paludis/repositories/e/vdb_id.hh1
6 files changed, 29 insertions, 0 deletions
diff --git a/paludis/repositories/e/e_repository_id.hh b/paludis/repositories/e/e_repository_id.hh
index 556d166..d3682ca 100644
--- a/paludis/repositories/e/e_repository_id.hh
+++ b/paludis/repositories/e/e_repository_id.hh
@@ -34,6 +34,7 @@ namespace paludis
virtual const tr1::shared_ptr<const EAPI> eapi() const PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
virtual const tr1::shared_ptr<const MetadataSpecTreeKey<RestrictSpecTree> > restrict_key() const = 0;
virtual const tr1::shared_ptr<const MetadataCollectionKey<UseFlagNameSet> > use_key() const = 0;
+ virtual const tr1::shared_ptr<const MetadataCollectionKey<KeywordNameSet> > eclass_keywords_key() const = 0;
virtual bool breaks_portage() const PALUDIS_ATTRIBUTE((warn_unused_result));
};
diff --git a/paludis/repositories/e/ebuild.cc b/paludis/repositories/e/ebuild.cc
index dcc9f39..758c3b7 100644
--- a/paludis/repositories/e/ebuild.cc
+++ b/paludis/repositories/e/ebuild.cc
@@ -437,6 +437,9 @@ EbuildMetadataCommand::load(const tr1::shared_ptr<const EbuildID> & id)
if (! m.metadata_keywords.empty())
id->load_keywords(m.metadata_keywords, m.description_keywords, get(keys, m.metadata_keywords));
+ if (! m.metadata_eclass_keywords.empty())
+ id->load_eclass_keywords(m.metadata_eclass_keywords, m.description_eclass_keywords, get(keys, m.metadata_eclass_keywords));
+
if (! m.metadata_restrict.empty())
id->load_restrict(m.metadata_restrict, m.description_restrict, get(keys, m.metadata_restrict));
diff --git a/paludis/repositories/e/ebuild_id.cc b/paludis/repositories/e/ebuild_id.cc
index 94bd8c4..3b745d4 100644
--- a/paludis/repositories/e/ebuild_id.cc
+++ b/paludis/repositories/e/ebuild_id.cc
@@ -85,6 +85,7 @@ namespace paludis
mutable tr1::shared_ptr<const ESimpleURIKey> homepage;
mutable tr1::shared_ptr<const ELicenseKey> license;
mutable tr1::shared_ptr<const EKeywordsKey> keywords;
+ mutable tr1::shared_ptr<const EKeywordsKey> eclass_keywords;
mutable tr1::shared_ptr<const EIUseKey> iuse;
mutable tr1::shared_ptr<const EInheritedKey> inherited;
mutable tr1::shared_ptr<const EUseKey> use;
@@ -505,6 +506,13 @@ EbuildID::keywords_key() const
return _imp->keywords;
}
+const tr1::shared_ptr<const MetadataCollectionKey<KeywordNameSet> >
+EbuildID::eclass_keywords_key() const
+{
+ need_keys_added();
+ return _imp->eclass_keywords;
+}
+
const tr1::shared_ptr<const MetadataCollectionKey<IUseFlagSet> >
EbuildID::iuse_key() const
{
@@ -785,6 +793,14 @@ EbuildID::load_keywords(const std::string & r, const std::string & h, const std:
}
void
+EbuildID::load_eclass_keywords(const std::string & r, const std::string & h, const std::string & v) const
+{
+ Lock l(_imp->mutex);
+ _imp->eclass_keywords.reset(new EKeywordsKey(_imp->environment, shared_from_this(), r, h, v, mkt_internal));
+ add_metadata_key(_imp->eclass_keywords);
+}
+
+void
EbuildID::load_inherited(const std::string & r, const std::string & h, const std::string & v) const
{
Lock l(_imp->mutex);
diff --git a/paludis/repositories/e/ebuild_id.hh b/paludis/repositories/e/ebuild_id.hh
index f86e2c4..c4ab9ad 100644
--- a/paludis/repositories/e/ebuild_id.hh
+++ b/paludis/repositories/e/ebuild_id.hh
@@ -65,6 +65,7 @@ namespace paludis
virtual const tr1::shared_ptr<const MetadataPackageIDKey> virtual_for_key() const;
virtual const tr1::shared_ptr<const MetadataCollectionKey<KeywordNameSet> > keywords_key() const;
+ virtual const tr1::shared_ptr<const MetadataCollectionKey<KeywordNameSet> > eclass_keywords_key() const;
virtual const tr1::shared_ptr<const MetadataCollectionKey<IUseFlagSet> > iuse_key() const;
virtual const tr1::shared_ptr<const MetadataSpecTreeKey<ProvideSpecTree> > provide_key() const;
virtual const tr1::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > build_dependencies_key() const;
@@ -113,6 +114,7 @@ namespace paludis
void load_use(const std::string &, const std::string &, const std::string &) const;
void load_inherited(const std::string &, const std::string &, const std::string &) const;
void load_keywords(const std::string &, const std::string &, const std::string &) const;
+ void load_eclass_keywords(const std::string &, const std::string &, const std::string &) const;
void load_restrict(const std::string &, const std::string &, const std::string &) const;
virtual bool supports_action(const SupportsActionTestBase &) const PALUDIS_ATTRIBUTE((warn_unused_result));
diff --git a/paludis/repositories/e/vdb_id.cc b/paludis/repositories/e/vdb_id.cc
index 8dc6754..be64b79 100644
--- a/paludis/repositories/e/vdb_id.cc
+++ b/paludis/repositories/e/vdb_id.cc
@@ -486,6 +486,12 @@ VDBID::keywords_key() const
return tr1::shared_ptr<const MetadataCollectionKey<KeywordNameSet> >();
}
+const tr1::shared_ptr<const MetadataCollectionKey<KeywordNameSet> >
+VDBID::eclass_keywords_key() const
+{
+ return tr1::shared_ptr<const MetadataCollectionKey<KeywordNameSet> >();
+}
+
const tr1::shared_ptr<const MetadataCollectionKey<UseFlagNameSet> >
VDBID::use_key() const
{
diff --git a/paludis/repositories/e/vdb_id.hh b/paludis/repositories/e/vdb_id.hh
index b39cdda..59a905f 100644
--- a/paludis/repositories/e/vdb_id.hh
+++ b/paludis/repositories/e/vdb_id.hh
@@ -60,6 +60,7 @@ namespace paludis
virtual const tr1::shared_ptr<const MetadataPackageIDKey> virtual_for_key() const;
virtual const tr1::shared_ptr<const MetadataCollectionKey<KeywordNameSet> > keywords_key() const;
+ virtual const tr1::shared_ptr<const MetadataCollectionKey<KeywordNameSet> > eclass_keywords_key() const;
virtual const tr1::shared_ptr<const MetadataCollectionKey<IUseFlagSet> > iuse_key() const;
virtual const tr1::shared_ptr<const MetadataSpecTreeKey<ProvideSpecTree> > provide_key() const;
virtual const tr1::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > build_dependencies_key() const;