aboutsummaryrefslogtreecommitdiff
path: root/bbot/worker/worker.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2023-04-25 12:05:09 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2023-04-25 12:05:09 +0300
commitd984c67c3bb6e9072f40ad99765741a52b5239f6 (patch)
tree569474f7a7ed3c45b7c8f13265fcf3fb93ff87c7 /bbot/worker/worker.cxx
parent23103a6e42d2901b0f5e52d56b232368a0035f0d (diff)
Fix worker broken with the previous commit
Diffstat (limited to 'bbot/worker/worker.cxx')
-rw-r--r--bbot/worker/worker.cxx32
1 files changed, 16 insertions, 16 deletions
diff --git a/bbot/worker/worker.cxx b/bbot/worker/worker.cxx
index 9d3962c..f9550f8 100644
--- a/bbot/worker/worker.cxx
+++ b/bbot/worker/worker.cxx
@@ -2238,6 +2238,11 @@ build (size_t argc, const char* argv[])
//
bool create_install (!target_pkg && (install_root || bindist));
+ // Configuration where the package will be installed from.
+ //
+ dir_path effective_install_conf (
+ rwd / (create_install ? install_conf : main_pkg_conf));
+
// Root configuration through which we will be configuring the cluster
// (note: does not necessarily match the main package type).
//
@@ -3731,13 +3736,9 @@ build (size_t argc, const char* argv[])
//
if (install_root)
{
- // Make install_conf refer to the actual configuration directory.
- //
- install_conf = rwd / (create_install ? install_conf : main_pkg_conf);
-
operation_result& r (add_result ("install"));
- change_wd (trace, &r.log, install_conf);
+ change_wd (trace, &r.log, effective_install_conf);
// Note that for a host or module package we don't need the target
// configuration anymore, if present. So let's free up the space a
@@ -4378,19 +4379,13 @@ build (size_t argc, const char* argv[])
//
if (!module_pkg)
{
- // Make install_conf refer to the actual configuration directory, if
- // not yet.
- //
- if (sys_install)
- install_conf = rwd / (create_install ? install_conf : main_pkg_conf);
-
assert (!rm.results.empty ());
// Result of the install or sys-install operation.
//
operation_result& r (rm.results.back ());
- change_wd (trace, &r.log, install_conf);
+ change_wd (trace, &r.log, effective_install_conf);
for (const b_project_info::subproject& sp: prj.subprojects)
{
@@ -5317,7 +5312,7 @@ build (size_t argc, const char* argv[])
{
operation_result& r (add_result ("uninstall"));
- change_wd (trace, &r.log, install_conf);
+ change_wd (trace, &r.log, effective_install_conf);
// bpkg uninstall <env-config-args> <tgt-config-args> <pkg-config-args>
// <package-name>
@@ -5373,6 +5368,8 @@ build (size_t argc, const char* argv[])
{
operation_result& r (add_result ("upload"));
+ change_wd (trace, &r.log, rwd);
+
dir_path d (upload_dir /
dir_path ("bindist") /
dir_path (bindist_result.distribution));
@@ -5393,12 +5390,15 @@ build (size_t argc, const char* argv[])
#else
bool mv (false);
#endif
- // Use relative paths to keep the operation log tidy.
+ // Use relative path, if possible, to keep the operation log tidy
+ // (won't be the case on Fedora).
//
+ const path& rp (p.sub (rwd) ? p.leaf (rwd) : p);
+
if (mv)
- mv_into (trace, &r.log, p.leaf (rwd), d);
+ mv_into (trace, &r.log, rp, d);
else
- cp_into (trace, &r.log, p.leaf (rwd), d);
+ cp_into (trace, &r.log, rp, d);
};
auto move_files = [&mv] (const vector<bindist_file>& bfs)