From f078440952b0a5aa1a0ee8942c7b62aa8a1eea77 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sat, 24 Nov 2018 17:14:13 +0300 Subject: Fix assertion failing during build plan simulation --- bpkg/pkg-build.cxx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/bpkg/pkg-build.cxx b/bpkg/pkg-build.cxx index ad61196..c337320 100644 --- a/bpkg/pkg-build.cxx +++ b/bpkg/pkg-build.cxx @@ -405,8 +405,11 @@ namespace bpkg // We don't allow a package specified on the command line multiple // times to have different sets of options/variables. // - assert (!user_selection () || - (keep_out == p.keep_out && config_vars == p.config_vars)); + // 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; @@ -3787,10 +3790,10 @@ namespace bpkg { // First, we check if the refinement is required, ignoring the // unsatisfiable dependency versions. If we end up refining the - // execution plan, such dependencies might be dropped, and then there - // will be nothing to complain about. When no more refinements are - // necessary we will run the diagnostics check, to make sure that the - // unsatisfiable dependency, if left, is reported. + // execution plan, such dependencies might be dropped, and then + // there will be nothing to complain about. When no more refinements + // are necessary we will run the diagnostics check, to make sure + // that the unsatisfiable dependency, if left, is reported. // auto need_refinement = [&eval_dep, &deps, rec_pkgs, &db, &o] ( bool diag = false) -> bool -- cgit v1.1