aboutsummaryrefslogtreecommitdiff
path: root/bpkg
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-11-25 00:27:14 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-11-25 00:27:14 +0300
commit9fe6aecb9eedea16f1803b0b866b73d00439b009 (patch)
tree7ac2aec2fd34bee2811e74a71e4750e4900eee93 /bpkg
parentac091c2d5a3b5435d18ab639264709f59bff1554 (diff)
Fix merging package variables in pkg-build
Diffstat (limited to 'bpkg')
-rw-r--r--bpkg/pkg-build.cxx17
1 files changed, 8 insertions, 9 deletions
diff --git a/bpkg/pkg-build.cxx b/bpkg/pkg-build.cxx
index c337320..9096026 100644
--- a/bpkg/pkg-build.cxx
+++ b/bpkg/pkg-build.cxx
@@ -403,18 +403,17 @@ namespace bpkg
if (p.user_selection ())
{
// We don't allow a package specified on the command line multiple
- // times to have different sets of options/variables.
+ // times to have different sets of options/variables. Given that, it's
+ // tempting to assert that the options/variables don't change if we
+ // merge into a user selection. That's, however, not the case due to
+ // the iterative plan refinement implementation details (variables are
+ // only saved into the pre-entered dependencies, etc.).
//
- // Note, however, that this doesn't relate to the keep_out flag that
- // also depends on whether the selected package is external or not, if
- // present, and may change during simulation.
- //
- assert (!user_selection () || config_vars == p.config_vars);
-
if (p.keep_out)
keep_out = p.keep_out;
- config_vars = move (p.config_vars);
+ if (!p.config_vars.empty ())
+ config_vars = move (p.config_vars);
// Propagate the user-selection tag.
//
@@ -3629,7 +3628,7 @@ namespace bpkg
{}, // Constraints.
d.system,
keep_out,
- strings (), // Configuration vars.
+ strings (), // Configuration variables.
{package_name ()}, // Required by (command line).
0}; // Adjustments.