aboutsummaryrefslogtreecommitdiff
path: root/paludis/version_spec.cc
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/version_spec.cc')
-rw-r--r--paludis/version_spec.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/paludis/version_spec.cc b/paludis/version_spec.cc
index ee33645..480eca9 100644
--- a/paludis/version_spec.cc
+++ b/paludis/version_spec.cc
@@ -53,6 +53,7 @@ namespace
empty,
revision,
patch,
+ trypart,
letter,
number,
scm
@@ -223,6 +224,22 @@ VersionSpec::VersionSpec(const std::string & text) :
_imp->parts.push_back(Part(patch, x));
}
+ /* try */
+ if (p < text.length() && 0 == text.compare(p, 4, "-try"))
+ {
+ x = std::numeric_limits<unsigned long>::max();
+ for (p += 4 ; p < text.length() ; ++p)
+ {
+ if (text.at(p) < '0' || text.at(p) > '9')
+ break;
+ if (x == std::numeric_limits<unsigned long>::max())
+ x = 0;
+ x *= 10;
+ x += text.at(p) - '0';
+ }
+ _imp->parts.push_back(Part(trypart, x));
+ }
+
/* scm */
if ((p < text.length()) && (0 == text.compare(p, 4, "-scm")))
{