From f3d3143aa67d1d038f5eee1103c2b783d54955c4 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 30 Nov 2018 13:28:04 +0300 Subject: Match build configuration names, targets and machine names as paths --- mod/mod-build-task.cxx | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'mod/mod-build-task.cxx') diff --git a/mod/mod-build-task.cxx b/mod/mod-build-task.cxx index 03c053a..d66e90c 100644 --- a/mod/mod-build-task.cxx +++ b/mod/mod-build-task.cxx @@ -154,10 +154,19 @@ handle (request& rq, response& rs) { for (auto& m: tqm.machines) { - if (path_match (c.machine_pattern, m.name) && - cfg_machines.insert ( - make_pair (c.name.c_str (), config_machine ({&c, &m}))).second) - cfg_names.push_back (c.name.c_str ()); + // The same story as in exclude() from build-config.cxx. + // + try + { + if (path_match (from_build_config_name (c.machine_pattern), + from_build_config_name (m.name), + dir_path () /* start */, + path_match_flags::match_absent) && + cfg_machines.insert ( + make_pair (c.name.c_str (), config_machine ({&c, &m}))).second) + cfg_names.push_back (c.name.c_str ()); + } + catch (const invalid_path&) {} } } -- cgit v1.1