diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2019-05-30 23:55:33 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2019-05-31 18:32:27 +0300 |
commit | 0f211c23677faffc005c5ead5ea5a509cc8390aa (patch) | |
tree | 3cafa9840b4512d8fec3234527a351468cf1cb8d /bpkg/manifest-utility.cxx | |
parent | ab9f63449f38a2ee7fe98d2644b303beaa499773 (diff) |
Allow specifying system package that doesn't belong to any repository for pkg-build
Diffstat (limited to 'bpkg/manifest-utility.cxx')
-rw-r--r-- | bpkg/manifest-utility.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bpkg/manifest-utility.cxx b/bpkg/manifest-utility.cxx index 4eae405..8ff2090 100644 --- a/bpkg/manifest-utility.cxx +++ b/bpkg/manifest-utility.cxx @@ -8,6 +8,7 @@ #include <libbutl/url.mxx> #include <libbutl/sha256.mxx> +#include <bpkg/package.hxx> // wildcard_version #include <bpkg/diagnostics.hxx> #include <bpkg/common-options.hxx> @@ -67,7 +68,7 @@ namespace bpkg } version - parse_package_version (const char* s) + parse_package_version (const char* s, bool allow_wildcard) { using traits = string::traits_type; @@ -76,6 +77,9 @@ namespace bpkg if (*++p == '\0') fail << "empty package version in '" << s << "'"; + if (allow_wildcard && strcmp (p, "*") == 0) + return wildcard_version; + try { return version (p); |