diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2021-04-16 10:26:01 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2021-04-16 10:26:01 +0200 |
commit | f092670a89ce4eb213cf295406996fe97d257d21 (patch) | |
tree | ae349358453b2b40b9b3560914a3029dc06903a7 /libbuild2/buildfile | |
parent | 14addc7e868d298f7399d20ac54a42d34151c07c (diff) |
Handle hermetic configurations in ~host and ~build2
Specifically, we keep config.config.environment but strip
config.config.hermetic. Also update the INSTALL file.
Diffstat (limited to 'libbuild2/buildfile')
-rw-r--r-- | libbuild2/buildfile | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/libbuild2/buildfile b/libbuild2/buildfile index 28adbdd..96fcfd2 100644 --- a/libbuild2/buildfile +++ b/libbuild2/buildfile @@ -66,18 +66,23 @@ config/cxx{host-config}: config/in{host-config} # For ~build2 also filter out config.install.chroot -- we definitely don't # want it carried through. # - build2_config = $regex.replace_lines( \ - $config.save(), \ - '^ *(#|config\.dist\.|config\.install\.chroot).*$', \ - [null], \ + # Finally, for both ~host and ~build2 we keep config.config.environment + # but strip config.config.hermetic* (we shouldn't be forcing hermiticity + # on the users of ~host/~build2; they can decide for themselves if they + # want it). + # + build2_config = $regex.replace_lines( \ + $config.save(), \ + '^ *(#|(config\.(dist\.|install\.chroot|config\.hermetic))).*$', \ + [null], \ return_lines) - # Also preserve blank lines between groups of options. + # Also preserve config.version and blank lines between groups of options. # - host_config = $regex.replace_lines( \ - $build2_config, \ - '^( *config\.(c[. ]|cxx[. ]|cc[.]|bin[.]).*|)$', \ - '$&', \ + host_config = $regex.replace_lines( \ + $build2_config, \ + '^( *config\.(c[. ]|cxx[. ]|cc[.]|bin[.]|config.environment |version ).*|)$', \ + '$&', \ format_no_copy return_lines) } |