diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2022-06-16 10:33:37 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2022-06-16 10:33:37 +0200 |
commit | 83eb0777a2ae76672691c2f4b8e6cd156058e6a5 (patch) | |
tree | 3ceb0fde4d705e098e4a3b53a1419169b2e27169 | |
parent | 856c55d0f8c50d0f371a546e4231e0f415975690 (diff) |
Relax assert (old src_root in outdated bootstrap.build)
-rw-r--r-- | bpkg/package-configuration.hxx | 2 | ||||
-rw-r--r-- | bpkg/package-skeleton.cxx | 12 |
2 files changed, 12 insertions, 2 deletions
diff --git a/bpkg/package-configuration.hxx b/bpkg/package-configuration.hxx index 6995857..0229f31 100644 --- a/bpkg/package-configuration.hxx +++ b/bpkg/package-configuration.hxx @@ -4,8 +4,6 @@ #ifndef BPKG_PACKAGE_CONFIGURATION_HXX #define BPKG_PACKAGE_CONFIGURATION_HXX -#include <map> - #include <libbuild2/types.hxx> // build2::names #include <libbuild2/config/types.hxx> // build2::config::variable_origin diff --git a/bpkg/package-skeleton.cxx b/bpkg/package-skeleton.cxx index b565bc1..c53421b 100644 --- a/bpkg/package-skeleton.cxx +++ b/bpkg/package-skeleton.cxx @@ -2684,7 +2684,19 @@ namespace bpkg if (!v) v = src_root; else + { + // If the package directory was moved, then it's possible we will have + // bootstrap.build with an old src_root value. Presumably this will + // cause the package to be re-configured and so ignoring the old value + // here should be ok. + // +#if 0 assert (cast<dir_path> (v) == src_root); +#else + if (cast<dir_path> (v) != src_root) + v = src_root; +#endif + } setup_root (rs, false /* forwarded */); |