From 7d8fe34a06781153f42c533ae7e303b3c5daf575 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 9 Dec 2021 15:51:42 +0300 Subject: Add support for multiple requirements in requirement alternative --- bbot/worker/worker.cxx | 8 +++++++- tests/integration/testscript | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/bbot/worker/worker.cxx b/bbot/worker/worker.cxx index d6e8cad..e4b5e5e 100644 --- a/bbot/worker/worker.cxx +++ b/bbot/worker/worker.cxx @@ -1270,7 +1270,13 @@ build (size_t argc, const char* argv[]) tm.requirements.end (), [id] (const requirement_alternatives& r) { - return r.size () == 1 && r[0] == id; + if (r.size () == 1) + { + const requirement_alternative& a (r[0]); + return find (a.begin (), a.end (), id) != a.end (); + } + + return false; }) != tm.requirements.end (); }; diff --git a/tests/integration/testscript b/tests/integration/testscript index 21570bf..94a718d 100644 --- a/tests/integration/testscript +++ b/tests/integration/testscript @@ -116,7 +116,7 @@ rfp = yes #\ pkg = cli -ver = 1.2.0-b.7.20211014122150.388da73246c0 +ver = 1.2.0-b.8.20211123111254.927cc0443f6e rep_url = "https://git.codesynthesis.com/cli/cli.git#master" rep_type = git #rep_url = https://stage.build2.org/1 -- cgit v1.1