aboutsummaryrefslogtreecommitdiff
path: root/bpkg/package-skeleton.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'bpkg/package-skeleton.cxx')
-rw-r--r--bpkg/package-skeleton.cxx16
1 files changed, 14 insertions, 2 deletions
diff --git a/bpkg/package-skeleton.cxx b/bpkg/package-skeleton.cxx
index fee4bbc..48de2d0 100644
--- a/bpkg/package-skeleton.cxx
+++ b/bpkg/package-skeleton.cxx
@@ -2488,8 +2488,20 @@ namespace bpkg
//
assert (skl.out_root_.empty ());
- auto i (tmp_dirs.find (skl.db_->config_orig));
- assert (i != tmp_dirs.end ());
+ // Note that only configurations which can be used as repository
+ // information sources has the temporary directory facility
+ // pre-initialized (see pkg-build.cxx for details). Thus, we may need
+ // to initialize it ourselves.
+ //
+ const dir_path& c (skl.db_->config_orig);
+ auto i (tmp_dirs.find (c));
+
+ if (i == tmp_dirs.end ())
+ {
+ init_tmp (c);
+
+ i = tmp_dirs.find (c);
+ }
// Make sure the source and out root directories, if set, are absolute
// and normalized.