diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2018-05-30 06:28:15 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2018-05-30 06:28:15 +0200 |
commit | 9975433887ac061b2aa50189dddb9d733e57d054 (patch) | |
tree | 075a7ce42880cdfd544e01a0aa4d79e934e079e7 | |
parent | 9d4c63f48f51b72e636b45983eab19f36bc4725b (diff) |
Allow trailing plus in package names (think libc++)0.7.0
-rw-r--r-- | libbpkg/package-name.cxx | 4 | ||||
-rw-r--r-- | tests/manifest/testscript | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/libbpkg/package-name.cxx b/libbpkg/package-name.cxx index c90d861..7a42ee3 100644 --- a/libbpkg/package-name.cxx +++ b/libbpkg/package-name.cxx @@ -50,9 +50,9 @@ namespace bpkg throw invalid_argument ("illegal character"); } - if (!alnum (nm.back ())) + if (!alnum (nm.back ()) && nm.back () != '+') throw invalid_argument ( - "illegal last character (must be alphabetic or digit)"); + "illegal last character (must be alphabetic, digit, or plus)"); value_ = move (nm); } diff --git a/tests/manifest/testscript b/tests/manifest/testscript index c8fdfaa..9d80bd6 100644 --- a/tests/manifest/testscript +++ b/tests/manifest/testscript @@ -56,7 +56,7 @@ : last-char : - $* -pp <<EOI 2>'stdin:4:7: error: invalid package name: illegal last character (must be alphabetic or digit)' != 0 + $* -pp <<EOI 2>'stdin:4:7: error: invalid package name: illegal last character (must be alphabetic, digit, or plus)' != 0 : 1 sha256sum: a2b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 : |