From 707408c353bbc4b563f2b9d7c89ce34bf4ab7d47 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 23 Jan 2019 14:33:26 +0300 Subject: Drop redundant repository checkout for pkg_checkout() simulation mode Repository checkout is only required to perform dist meta-operation for the checked out package, which is disabled in the simulation mode anyway. --- bpkg/pkg-checkout.cxx | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'bpkg') diff --git a/bpkg/pkg-checkout.cxx b/bpkg/pkg-checkout.cxx index a8f654c..6e0f92a 100644 --- a/bpkg/pkg-checkout.cxx +++ b/bpkg/pkg-checkout.cxx @@ -130,30 +130,30 @@ namespace bpkg text << "checking out " << pl->location.leaf () << " " << "from " << pl->repository_fragment->name; - // Checkout the repository fragment. - // const repository_location& rl (pl->repository_fragment->location); - dir_path sd (c / repos_dir / repository_state (rl)); - checkout (o, rl, sd, ap); - - // Calculate the package path that points into the checked out fragment - // directory. - // - sd /= path_cast (pl->location); - - // Verify the package prerequisites are all configured since the dist - // meta-operation generally requires all imports to be resolvable. - // - package_manifest m (pkg_verify (sd, true /* ignore_unknown */)); - pkg_configure_prerequisites (o, t, m.dependencies, m.name); - auto_rmdir rmd; optional mc; dir_path d (c / dir_path (n.string () + '-' + v.string ())); if (!simulate) { + // Checkout the repository fragment. + // + dir_path sd (c / repos_dir / repository_state (rl)); + checkout (o, rl, sd, ap); + + // Calculate the package path that points into the checked out fragment + // directory. + // + sd /= path_cast (pl->location); + + // Verify the package prerequisites are all configured since the dist + // meta-operation generally requires all imports to be resolvable. + // + package_manifest m (pkg_verify (sd, true /* ignore_unknown */)); + pkg_configure_prerequisites (o, t, m.dependencies, m.name); + if (exists (d)) fail << "package directory " << d << " already exists"; -- cgit v1.1