aboutsummaryrefslogtreecommitdiff
path: root/bpkg/pkg-build.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2021-07-29 18:32:14 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2021-07-30 11:04:37 +0300
commit7490948f27d70df1f88ed161a2b758755d0a7929 (patch)
tree464099162afbf339c6cb502ba38d84ae0f9ced1e /bpkg/pkg-build.cxx
parentaaf8e696886f443cd095ca7a5f37fc5b1ce0e207 (diff)
Add support for checked out repository fragments caching
Diffstat (limited to 'bpkg/pkg-build.cxx')
-rw-r--r--bpkg/pkg-build.cxx36
1 files changed, 20 insertions, 16 deletions
diff --git a/bpkg/pkg-build.cxx b/bpkg/pkg-build.cxx
index f2af79a..8e50d05 100644
--- a/bpkg/pkg-build.cxx
+++ b/bpkg/pkg-build.cxx
@@ -5994,6 +5994,7 @@ namespace bpkg
// purge, fetch/unpack|checkout
//
+ pkg_checkout_cache checkout_cache (o);
for (build_package& p: reverse_iterate (build_pkgs))
{
assert (p.action);
@@ -6125,22 +6126,24 @@ namespace bpkg
case repository_basis::version_control:
{
sp = p.checkout_root
- ? pkg_checkout (o,
- pdb,
- t,
- ap->id.name,
- p.available_version (),
- *p.checkout_root,
- true /* replace */,
- p.checkout_purge,
- simulate)
- : pkg_checkout (o,
- pdb,
- t,
- ap->id.name,
- p.available_version (),
- true /* replace */,
- simulate);
+ ? pkg_checkout (checkout_cache,
+ o,
+ pdb,
+ t,
+ ap->id.name,
+ p.available_version (),
+ *p.checkout_root,
+ true /* replace */,
+ p.checkout_purge,
+ simulate)
+ : pkg_checkout (checkout_cache,
+ o,
+ pdb,
+ t,
+ ap->id.name,
+ p.available_version (),
+ true /* replace */,
+ simulate);
break;
}
case repository_basis::directory:
@@ -6257,6 +6260,7 @@ namespace bpkg
break; // Get out from the breakout loop.
}
}
+ checkout_cache.clear (); // Detect errors.
// configure
//