aboutsummaryrefslogtreecommitdiff
path: root/paludis/environments/paludis/paludis_environment.cc
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/environments/paludis/paludis_environment.cc')
-rw-r--r--paludis/environments/paludis/paludis_environment.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/paludis/environments/paludis/paludis_environment.cc b/paludis/environments/paludis/paludis_environment.cc
index c7ed4e74b..f62454b06 100644
--- a/paludis/environments/paludis/paludis_environment.cc
+++ b/paludis/environments/paludis/paludis_environment.cc
@@ -89,6 +89,7 @@ namespace paludis
std::shared_ptr<LiteralMetadataValueKey<FSPath> > config_location_key;
std::shared_ptr<LiteralMetadataValueKey<FSPath> > world_file_key;
std::shared_ptr<LiteralMetadataValueKey<FSPath> > preferred_root_key;
+ std::shared_ptr<LiteralMetadataValueKey<FSPath> > system_root_key;
Imp(PaludisEnvironment * const e, std::shared_ptr<PaludisConfig> c) :
done_hooks(false),
@@ -102,7 +103,9 @@ namespace paludis
*config->world()->location_if_set())
: std::shared_ptr<LiteralMetadataValueKey<FSPath> >()),
preferred_root_key(std::make_shared<LiteralMetadataValueKey<FSPath>>("root", "Root", mkt_normal,
- FSPath(config->root())))
+ FSPath(config->root()))),
+ system_root_key(std::make_shared<LiteralMetadataValueKey<FSPath>>("system_root", "System Root", mkt_normal,
+ FSPath("/")))
{
}
@@ -162,6 +165,7 @@ PaludisEnvironment::PaludisEnvironment(const std::string & s) :
if (_imp->world_file_key)
add_metadata_key(_imp->world_file_key);
add_metadata_key(_imp->preferred_root_key);
+ add_metadata_key(_imp->system_root_key);
}
PaludisEnvironment::~PaludisEnvironment()
@@ -457,6 +461,12 @@ PaludisEnvironment::preferred_root_key() const
return _imp->preferred_root_key;
}
+const std::shared_ptr<const MetadataValueKey<FSPath> >
+PaludisEnvironment::system_root_key() const
+{
+ return _imp->system_root_key;
+}
+
const Tribool
PaludisEnvironment::want_choice_enabled(
const std::shared_ptr<const PackageID> & id,