aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-01-23 14:33:26 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-01-23 14:34:52 +0300
commit707408c353bbc4b563f2b9d7c89ce34bf4ab7d47 (patch)
treed4908039a1c406b13e885c06e89c4a6aab4d0c16
parent749e1ae13a0c65b92d91cd61cdbe28099447a254 (diff)
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.
-rw-r--r--bpkg/pkg-checkout.cxx32
1 files changed, 16 insertions, 16 deletions
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<dir_path> (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<string> 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<dir_path> (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";