aboutsummaryrefslogtreecommitdiff
path: root/libbuild2
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-03-04 06:25:23 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-03-04 06:28:34 +0200
commit6cdd7359a0f547c2c702103748198a54b75913b5 (patch)
tree4db147d55079609c57ce470c97e8b7e378a9ca77 /libbuild2
parente98960e4b179b3cdedcb6191a5910eb73e4d1ffe (diff)
Fix bug in config.config.persist logic
Diffstat (limited to 'libbuild2')
-rw-r--r--libbuild2/config/init.cxx2
-rw-r--r--libbuild2/config/operation.cxx10
2 files changed, 10 insertions, 2 deletions
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;