diff options
-rw-r--r-- | bpkg/pkg-checkout.cxx | 32 |
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"; |