aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2023-04-17 11:21:49 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2023-04-17 11:24:52 +0300
commit6af64b827fe913d7b65ff47593c467b8f171d728 (patch)
tree2e8963637d013211ed6897ff301fcf490952fce6
parenta1d5c79a5014d3cc2c5d2a50cc526638f4abcd65 (diff)
Pass global import override for bootstrap module globally on bpkg command line in worker
-rw-r--r--bbot/worker/worker.cxx19
-rw-r--r--tests/integration/testscript2
2 files changed, 8 insertions, 13 deletions
diff --git a/bbot/worker/worker.cxx b/bbot/worker/worker.cxx
index 24944d2..f55f867 100644
--- a/bbot/worker/worker.cxx
+++ b/bbot/worker/worker.cxx
@@ -2029,6 +2029,10 @@ build (size_t argc, const char* argv[])
// (see pkg_configure() for details). Thus, we need to pass the
// !config.import.* global override wherever required ourselves.
//
+ // Also note that since this override is global, it may only be specified
+ // globally on the bpkg command line (as opposed to package-specific
+ // overrides).
+ //
optional<string> bootstrap_import;
if (bootstrap)
@@ -2780,9 +2784,6 @@ build (size_t argc, const char* argv[])
pkgs.push_back ("--checkout-root");
pkgs.push_back (dist_root.string ());
- if (bootstrap_import)
- pkgs.push_back (*bootstrap_import);
-
pkgs.insert (pkgs.end (), eas.begin (), eas.end ());
pkgs.insert (pkgs.end (), cas.begin (), cas.end ());
pkgs.insert (pkgs.end (), pas.begin (), pas.end ());
@@ -2804,9 +2805,6 @@ build (size_t argc, const char* argv[])
pkgs.push_back ("--checkout-root");
pkgs.push_back (dist_root.string ());
- if (bootstrap_import)
- pkgs.push_back (*bootstrap_import);
-
pkgs.insert (pkgs.end (), eas.begin (), eas.end ());
pkgs.insert (pkgs.end (), cas.begin (), cas.end ());
pkgs.insert (pkgs.end (), pas.begin (), pas.end ());
@@ -2886,9 +2884,6 @@ build (size_t argc, const char* argv[])
pkgs.push_back ("--checkout-root");
pkgs.push_back (dist_root.string ());
- if (bootstrap_import)
- pkgs.push_back (*bootstrap_import);
-
pkgs.insert (pkgs.end (), eas.begin (), eas.end ());
pkgs.insert (pkgs.end (), cas.begin (), cas.end ());
pkgs.insert (pkgs.end (), pas.begin (), pas.end ());
@@ -2912,9 +2907,6 @@ build (size_t argc, const char* argv[])
pkgs.push_back ("--checkout-root");
pkgs.push_back (dist_root.string ());
- if (bootstrap_import)
- pkgs.push_back (*bootstrap_import);
-
pkgs.insert (pkgs.end (), eas.begin (), eas.end ());
pkgs.insert (pkgs.end (), cas.begin (), cas.end ());
pkgs.insert (pkgs.end (), pas.begin (), pas.end ());
@@ -3032,6 +3024,9 @@ build (size_t argc, const char* argv[])
step_args (pkg_args, s),
common_args,
pkg_config_opts,
+ (has_runtime_tests || has_buildtime_tests
+ ? bootstrap_import
+ : nullopt),
"--",
pkgs);
diff --git a/tests/integration/testscript b/tests/integration/testscript
index 597a10f..2e3cc3d 100644
--- a/tests/integration/testscript
+++ b/tests/integration/testscript
@@ -189,7 +189,7 @@ bpkg.module.create:config.bin.rpath=[null]
#
#\
pkg = libbuild2-autoconf
-ver = 0.1.0-a.0.20220629084006.3c4928213194
+ver = 0.2.0-a.0.20230323135046.19cd67c1fa85
rep_url = "https://github.com/build2/libbuild2-autoconf.git#master"
rep_type = git
rfp = yes