diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2022-01-18 14:03:20 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2022-01-18 14:03:20 +0300 |
commit | 417ce421010dd1dd26dc362c8d4e3451f16182a3 (patch) | |
tree | 81afbaa836b29da60ebe0baa6b8a916978a79482 /libbpkg/manifest.cxx | |
parent | 62bd2494177be466dc6c1f418db328e99bae53ec (diff) |
Temporary support requirements similar to '? cli'
Diffstat (limited to 'libbpkg/manifest.cxx')
-rw-r--r-- | libbpkg/manifest.cxx | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/libbpkg/manifest.cxx b/libbpkg/manifest.cxx index 6a5ce25..88d4a87 100644 --- a/libbpkg/manifest.cxx +++ b/libbpkg/manifest.cxx @@ -1989,9 +1989,23 @@ namespace bpkg if (requirements_ && first && tt == type::question) { r.emplace_back (dependency ()); - r.enable = lexer_->peek_char () == '(' ? parse_eval () : string (); + + bool eval (lexer_->peek_char () == '('); + r.enable = eval ? parse_eval () : string (); next (t, tt); + + // @@ TMP Treat requirements similar to `? cli` as `cli ?` until + // toolchain 0.15.0 and ODB 2.5.0-b.22 are both released. + // + if (!eval && tt == type::word) + try + { + r.back ().name = package_name (move (t.value)); + next (t, tt); + } + catch (const invalid_argument&) {} + return r; } |