aboutsummaryrefslogtreecommitdiff
path: root/bpkg/manifest-utility.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'bpkg/manifest-utility.cxx')
-rw-r--r--bpkg/manifest-utility.cxx13
1 files changed, 11 insertions, 2 deletions
diff --git a/bpkg/manifest-utility.cxx b/bpkg/manifest-utility.cxx
index 8ff2090..74daf6b 100644
--- a/bpkg/manifest-utility.cxx
+++ b/bpkg/manifest-utility.cxx
@@ -82,11 +82,20 @@ namespace bpkg
try
{
- return version (p);
+ version r (p);
+
+ if (r.release && r.release->empty ())
+ throw invalid_argument ("earliest version");
+
+ if (r.compare (wildcard_version, true /* ignore_revision */) == 0)
+ throw invalid_argument ("stub version");
+
+ return r;
}
catch (const invalid_argument& e)
{
- fail << "invalid package version '" << p << "': " << e;
+ fail << "invalid package version '" << p << "' in '" << s << "': "
+ << e;
}
}