aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/e_installed_repository_id.cc
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/repositories/e/e_installed_repository_id.cc')
-rw-r--r--paludis/repositories/e/e_installed_repository_id.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/paludis/repositories/e/e_installed_repository_id.cc b/paludis/repositories/e/e_installed_repository_id.cc
index fd4b01af9..e6edae5c2 100644
--- a/paludis/repositories/e/e_installed_repository_id.cc
+++ b/paludis/repositories/e/e_installed_repository_id.cc
@@ -72,6 +72,7 @@ namespace
std::shared_ptr<const MetadataCollectionKey<Set<std::string > > > raw_iuse;
std::shared_ptr<const MetadataCollectionKey<Set<std::string > > > raw_iuse_effective;
std::shared_ptr<const MetadataSpecTreeKey<PlainTextSpecTree> > raw_myoptions;
+ std::shared_ptr<const MetadataSpecTreeKey<RequiredUseSpecTree> > required_use;
std::shared_ptr<const MetadataCollectionKey<Set<std::string > > > raw_use_expand;
std::shared_ptr<const MetadataCollectionKey<Set<std::string > > > raw_use_expand_hidden;
std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Choices> > > choices;
@@ -279,6 +280,14 @@ EInstalledRepositoryID::need_keys_added() const
add_metadata_key(_imp->keys->raw_myoptions);
}
+ if (! vars->required_use()->name().empty())
+ if ((_imp->dir / vars->required_use()->name()).stat().exists())
+ {
+ _imp->keys->required_use = std::make_shared<ERequiredUseKey>(_imp->environment, shared_from_this(), vars->required_use()->name(),
+ vars->required_use()->description(), file_contents(_imp->dir / vars->required_use()->name()), mkt_internal);
+ add_metadata_key(_imp->keys->required_use);
+ }
+
if (! vars->use_expand()->name().empty())
if ((_imp->dir / vars->use_expand()->name()).stat().exists())
{
@@ -717,6 +726,13 @@ EInstalledRepositoryID::raw_myoptions_key() const
return _imp->keys->raw_myoptions;
}
+const std::shared_ptr<const MetadataSpecTreeKey<RequiredUseSpecTree> >
+EInstalledRepositoryID::required_use_key() const
+{
+ need_keys_added();
+ return _imp->keys->required_use;
+}
+
const std::shared_ptr<const MetadataCollectionKey<Set<std::string> > >
EInstalledRepositoryID::raw_use_expand_key() const
{