aboutsummaryrefslogtreecommitdiff
path: root/paludis/resolver/package_or_block_dep_spec.cc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-12-19 16:46:09 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-12-19 16:46:09 +0000
commit17b625c28f10fbc765f1a99af433da1e39a9253e (patch)
treebb9afd6ea7d811dc67937d2fb54094e5fe78c77a /paludis/resolver/package_or_block_dep_spec.cc
parent7d994ad210d8fc308a506ad9c2cd3eeed4607a65 (diff)
downloadpaludis-17b625c28f10fbc765f1a99af433da1e39a9253e.tar.gz
paludis-17b625c28f10fbc765f1a99af433da1e39a9253e.tar.xz
Annotations have roles
Diffstat (limited to 'paludis/resolver/package_or_block_dep_spec.cc')
-rw-r--r--paludis/resolver/package_or_block_dep_spec.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/paludis/resolver/package_or_block_dep_spec.cc b/paludis/resolver/package_or_block_dep_spec.cc
index 23ad5349b..059031ea4 100644
--- a/paludis/resolver/package_or_block_dep_spec.cc
+++ b/paludis/resolver/package_or_block_dep_spec.cc
@@ -89,6 +89,7 @@ PackageOrBlockDepSpec::serialise(Serialiser & s) const
{
w.member(SerialiserFlags<>(), "annotations_k_" + stringify(n), m->key());
w.member(SerialiserFlags<>(), "annotations_v_" + stringify(n), m->value());
+ w.member(SerialiserFlags<>(), "annotations_r_" + stringify(n), stringify(m->role()));
++n;
}
@@ -120,8 +121,10 @@ PackageOrBlockDepSpec::deserialise(Deserialisation & d, const std::shared_ptr<co
{
std::string key(v.member<std::string>("annotations_k_" + stringify(a)));
std::string value(v.member<std::string>("annotations_v_" + stringify(a)));
+ std::string role(v.member<std::string>("annotations_r_" + stringify(a)));
annotations->add(make_named_values<DepSpecAnnotation>(
n::key() = key,
+ n::role() = destringify<DepSpecAnnotationRole>(role),
n::value() = value
));
}