aboutsummaryrefslogtreecommitdiff
path: root/paludis/user_dep_spec.cc
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/user_dep_spec.cc')
-rw-r--r--paludis/user_dep_spec.cc21
1 files changed, 20 insertions, 1 deletions
diff --git a/paludis/user_dep_spec.cc b/paludis/user_dep_spec.cc
index bcee27f91..61ec80d66 100644
--- a/paludis/user_dep_spec.cc
+++ b/paludis/user_dep_spec.cc
@@ -760,7 +760,20 @@ UserKeyRequirement::requirement_met(const Environment * const, const ChangedChoi
const MetadataKey * key(0);
- if ((! _imp->key.empty()) && (_imp->key.at(0) == '$'))
+ if (0 == _imp->key.compare(0, 3, "::$"))
+ {
+ if (_imp->key == "::$format")
+ key = id.repository()->format_key().get();
+ else if (_imp->key == "::$location")
+ key = id.repository()->location_key().get();
+ else if (_imp->key == "::$installed_root")
+ key = id.repository()->installed_root_key().get();
+ else if (_imp->key == "::$accept_keywords")
+ key = id.repository()->accept_keywords_key().get();
+ else if (_imp->key == "::$sync_host")
+ key = id.repository()->sync_host_key().get();
+ }
+ else if (0 == _imp->key.compare(0, 1, "$"))
{
if (_imp->key == "$behaviours")
key = id.behaviours_key().get();
@@ -805,6 +818,12 @@ UserKeyRequirement::requirement_met(const Environment * const, const ChangedChoi
else if (_imp->key == "$virtual_for")
key = id.virtual_for_key().get();
}
+ else if (0 == _imp->key.compare(0, 2, "::"))
+ {
+ Repository::MetadataConstIterator m(id.repository()->find_metadata(_imp->key.substr(2)));
+ if (m != id.repository()->end_metadata())
+ key = m->get();
+ }
else
{
PackageID::MetadataConstIterator m(id.find_metadata(_imp->key));