From 7490948f27d70df1f88ed161a2b758755d0a7929 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 29 Jul 2021 18:32:14 +0300 Subject: Add support for checked out repository fragments caching --- bpkg/pkg-build.cxx | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) (limited to 'bpkg/pkg-build.cxx') 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 // -- cgit v1.1