aboutsummaryrefslogtreecommitdiff
path: root/bpkg/pkg-checkout.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'bpkg/pkg-checkout.cxx')
-rw-r--r--bpkg/pkg-checkout.cxx13
1 files changed, 11 insertions, 2 deletions
diff --git a/bpkg/pkg-checkout.cxx b/bpkg/pkg-checkout.cxx
index d8c6819..49fc89f 100644
--- a/bpkg/pkg-checkout.cxx
+++ b/bpkg/pkg-checkout.cxx
@@ -191,6 +191,15 @@ namespace bpkg
dir_path sd (repository_state (rl));
dir_path rd (rdb.config_orig / repos_dir / sd);
+ // Use the temporary directory from the repository information source
+ // configuration, so that we can always move the repository into and out
+ // of it (note that if they appear on different filesystems that won't
+ // be possible).
+ //
+ auto ti (temp_dir.find (rdb.config_orig));
+ assert (ti != temp_dir.end ());
+ const dir_path& tdir (ti->second);
+
// Try to reuse the cached repository (moved to the temporary directory
// with some fragment checked out and fixed up).
//
@@ -214,7 +223,7 @@ namespace bpkg
// The repository temporary directory.
//
- auto_rmdir rmt (temp_dir / sd);
+ auto_rmdir rmt (tdir / sd);
// Move the repository to the temporary directory.
//
@@ -248,7 +257,7 @@ namespace bpkg
// The temporary out of source directory that is required for the dist
// meta-operation.
//
- auto_rmdir rmo (temp_dir / dir_path (n.string ()));
+ auto_rmdir rmo (tdir / dir_path (n.string ()));
const dir_path& od (rmo.path);
if (exists (od))