From 6cdd7359a0f547c2c702103748198a54b75913b5 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 4 Mar 2020 06:25:23 +0200 Subject: Fix bug in config.config.persist logic --- libbuild2/config/init.cxx | 2 +- libbuild2/config/operation.cxx | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'libbuild2/config') diff --git a/libbuild2/config/init.cxx b/libbuild2/config/init.cxx index 5e13de7..57b6290 100644 --- a/libbuild2/config/init.cxx +++ b/libbuild2/config/init.cxx @@ -110,7 +110,7 @@ namespace build2 { // Used as a variable prefix by configure_execute(). // - vp.insert ("config.import"); + vp.insert ("config"); auto& m (extra.set_module (new module)); diff --git a/libbuild2/config/operation.cxx b/libbuild2/config/operation.cxx index 7b134c1..3758c87 100644 --- a/libbuild2/config/operation.cxx +++ b/libbuild2/config/operation.cxx @@ -218,7 +218,7 @@ namespace build2 // auto& vp (ctx.var_pool); - for (auto p (rs.vars.find_namespace (*vp.find ("config.import"))); + for (auto p (rs.vars.find_namespace (*vp.find ("config"))); p.first != p.second; ++p.first) { @@ -230,6 +230,14 @@ namespace build2 if (size_t n = var->override ()) var = vp.find (string (var->name, 0, n)); + // Skip special variables. + // + if (var->name == "config.booted" || + var->name == "config.loaded" || + var->name == "config.configured" || + var->name.compare (0, 14, "config.config.") == 0) + continue; + if (mod->saved (*var)) continue; -- cgit v1.1