aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-01-26 21:45:37 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-01-26 21:45:37 +0000
commitc1bd6750d435126c85f2fe6e2dc9c58c97c96080 (patch)
tree4ae1f4a61b623b2f76f4fa47a27bd9b5dc691aad
parent47b84d5397f12dee8beb36959e7140f4cdbf6085 (diff)
downloadpaludis-c1bd6750d435126c85f2fe6e2dc9c58c97c96080.tar.gz
paludis-c1bd6750d435126c85f2fe6e2dc9c58c97c96080.tar.xz
Fix descriptions for < ops
-rw-r--r--paludis/user_dep_spec.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/paludis/user_dep_spec.cc b/paludis/user_dep_spec.cc
index bbef7a2..3afc32c 100644
--- a/paludis/user_dep_spec.cc
+++ b/paludis/user_dep_spec.cc
@@ -760,13 +760,21 @@ UserKeyRequirement::requirement_met(const Environment * const, const PackageID &
const std::string
UserKeyRequirement::as_human_string() const
{
- return "Key '" + _imp->key + "' has simple string value '" + _imp->value + "'";
+ switch (_imp->op)
+ {
+ case '=':
+ return "Key '" + _imp->key + "' has simple string value '" + _imp->value + "'";
+ case '<':
+ return "Key '" + _imp->key + "' contains or is less than '" + _imp->value + "'";
+ }
+
+ throw InternalError(PALUDIS_HERE, "unknown op");
}
const std::string
UserKeyRequirement::as_raw_string() const
{
- return "[." + _imp->key + "=" + _imp->value + "]";
+ return "[." + _imp->key + std::string(1, _imp->op) + _imp->value + "]";
}
VersionSpecOptions