diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-04-12 15:36:24 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-04-12 15:36:24 +0200 |
commit | e0c4d1dc2b6bc5ee238ea94cd0803855a337efdf (patch) | |
tree | 14d312935b6cd16bb6beea5c8945c326949d1e51 /bpkg/pkg-command.cxx | |
parent | f4120bea7831bfd894e03dd25e3849cd84571f8b (diff) | |
download | bpkg-e0c4d1dc2b6bc5ee238ea94cd0803855a337efdf.tar.gz bpkg-e0c4d1dc2b6bc5ee238ea94cd0803855a337efdf.tar.xz bpkg-e0c4d1dc2b6bc5ee238ea94cd0803855a337efdf.zip |
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.
Diffstat (limited to 'bpkg/pkg-command.cxx')
-rw-r--r-- | bpkg/pkg-command.cxx | 19 |
1 files changed, 10 insertions, 9 deletions
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) { |