From 538711543c68be94b3e7e3192394bc2f19f49516 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 8 Mar 2018 23:21:38 +0300 Subject: Call output directory just for external packages --- bpkg/pkg-configure.cxx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'bpkg/pkg-configure.cxx') diff --git a/bpkg/pkg-configure.cxx b/bpkg/pkg-configure.cxx index 86aadcb..c839d42 100644 --- a/bpkg/pkg-configure.cxx +++ b/bpkg/pkg-configure.cxx @@ -126,7 +126,17 @@ namespace bpkg dir_path src_root (p->src_root->absolute () ? *p->src_root : c / *p->src_root); - dir_path out_root (c / dir_path (p->name + "-" + p->version.string ())); + + const repository_location& rl (p->repository); + + // For external packages call the output directory , rather than + // -. + // + dir_path out_root ( + (!rl.empty () && rl.directory_based ()) || // pkg-unpack / + ( rl.empty () && !p->archive) // pkg-unpack --existing + ? c / dir_path (p->name) + : c / dir_path (p->name + "-" + p->version.string ())); l4 ([&]{trace << "src_root: " << src_root << ", " << "out_root: " << out_root;}); -- cgit v1.1