aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2023-05-22 18:14:54 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2023-05-22 18:14:54 +0200
commit8bb9424799cbcae6f0455e96dde9e0ecfc6a4411 (patch)
tree1cfd73e97166c17293134d03028aafe0b27c274f
parent3323779f3e359bfa1d48ba5e37b6dddb609fc7e2 (diff)
Add all src_root!=out_root packages as subprojects during in-process configure
Before we assumed this can only happen for external packages but it turns out to also happen for packages with a custom checkout_root (--checkout-root).
-rw-r--r--bpkg/pkg-configure.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/bpkg/pkg-configure.cxx b/bpkg/pkg-configure.cxx
index e6e0b8d..45ab10b 100644
--- a/bpkg/pkg-configure.cxx
+++ b/bpkg/pkg-configure.cxx
@@ -477,10 +477,8 @@ namespace bpkg
//
// Note: see a version of this in pkg_configure_prerequisites().
//
- bool external (p->external ());
-
dir_path out_root (
- external
+ p->external ()
? c / dir_path (p->name.string ())
: c / dir_path (p->name.string () + '-' + p->version.string ()));
@@ -618,8 +616,8 @@ namespace bpkg
//
bootstrap_pre (rs, altn);
bootstrap_src (rs, altn,
- db.config.relative (out_root) /* amalgamation */,
- true /* subprojects */);
+ c.relative (out_root) /* amalgamation */,
+ true /* subprojects */);
create_bootstrap_outer (rs, true /* subprojects */);
bootstrap_post (rs);
@@ -689,11 +687,13 @@ namespace bpkg
// Here is a tricky part: if this is a normal package, then it will be
// discovered as a subproject of the bpkg configuration when we load
// it for the first time (because they are all unpacked). However, if
- // this is an external package, there could be no out_root directory
- // for it in the bpkg configuration yet. As a result, we need to
- // manually add it as a newly discovered subproject.
+ // this is a package with src_root!=out_root (such as an external
+ // package or a package with a custom checkout_root) then there could
+ // be no out_root directory for it in the bpkg configuration yet. As a
+ // result, we need to manually add it as a newly discovered
+ // subproject.
//
- if (external)
+ if (!rs.out_eq_src ())
{
scope* as (rs.parent_scope ()->root_scope ());
assert (as != nullptr); // No bpkg configuration?