From e0c4d1dc2b6bc5ee238ea94cd0803855a337efdf Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 12 Apr 2016 15:36:24 +0200 Subject: Set common variables in pkg-* commands on the whole configuration This makes a difference, for example, in pkg-install where install.root is needed by prerequisites. --- bpkg/pkg-command.cxx | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'bpkg/pkg-command.cxx') diff --git a/bpkg/pkg-command.cxx b/bpkg/pkg-command.cxx index ef473f0..57c3f53 100644 --- a/bpkg/pkg-command.cxx +++ b/bpkg/pkg-command.cxx @@ -31,16 +31,17 @@ namespace bpkg // string bspec; - auto run = [&trace, &o, &cvars, &bspec](const strings& vars = strings ()) + auto run = + [&trace, &c, &o, &cvars, &bspec] ( const strings& vars = strings ()) + { + if (!bspec.empty ()) { - if (!bspec.empty ()) - { - bspec += ')'; - l4 ([&]{trace << "buildspec: " << bspec;}); - run_b (o, bspec, false, cvars, vars); - bspec.clear (); - } - }; + bspec += ')'; + l4 ([&]{trace << "buildspec: " << bspec;}); + run_b (o, c, bspec, false, vars, cvars); + bspec.clear (); + } + }; for (const pkg_command_vars& pv: ps) { -- cgit v1.1