aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bbot/worker/worker.cxx32
-rw-r--r--tests/integration/testscript9
2 files changed, 25 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)
diff --git a/tests/integration/testscript b/tests/integration/testscript
index 22f9a5f..012a00a 100644
--- a/tests/integration/testscript
+++ b/tests/integration/testscript
@@ -180,6 +180,9 @@ package_config = "package-config:
+bpkg.bindist.archive:--archive-build-meta=
bbot.sys-install.tar.extract:--directory=$~
bbot.sys-install.tar.extract:--strip-components=1
+
++bbot.bindist.upload:
+
bpkg.create:config.bin.rpath=[null]
\\"
config = "$config bpkg.create:config.install.root=\"'$~/usr/local'\""
@@ -256,6 +259,9 @@ package_config = "package-config:
+bpkg.bindist.archive:--archive-build-meta=
bbot.sys-install.tar.extract:--directory=$~
bbot.sys-install.tar.extract:--strip-components=1
+
++bbot.bindist.upload:
+
bpkg.create:config.bin.rpath=[null]
\\"
config = "$config bpkg.create:config.install.root=\"'$~/usr/local'\""
@@ -265,6 +271,9 @@ config = "$config bpkg.create:config.install.root=\"'$~/usr/local'\""
package_config = 'package-config:
\
+bpkg.bindist.fedora:
+
++bbot.bindist.upload:
+
bpkg.create:config.bin.rpath=[null]
\'
#\