aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2024-06-20 16:30:35 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2024-06-20 16:30:35 +0300
commit3f4cdc9ad159621446579c5385bb4582217c4ddf (patch)
tree21397ba9d5e9ca32f5b3a4a4253718dedc01a0f2
parent0ba71acaf219b4fd8a07b2ba815f9f96b7c03423 (diff)
In worker suppress warnings for host/module configuration unless used for main package and target configuration is self-hosted
-rw-r--r--bbot/worker/worker.cxx29
-rw-r--r--doc/manual.cli16
-rw-r--r--tests/integration/testscript20
3 files changed, 38 insertions, 27 deletions
diff --git a/bbot/worker/worker.cxx b/bbot/worker/worker.cxx
index 8fb7796..700ed79 100644
--- a/bbot/worker/worker.cxx
+++ b/bbot/worker/worker.cxx
@@ -2549,7 +2549,7 @@ build (size_t argc, const char* argv[])
}
else
{
- // b create(<dir>) config.config.load=~host
+ // b create(<dir>) config.config.load=~host-no-warnings
//
// Note also that we suppress warnings about unused config.* values.
//
@@ -2559,7 +2559,7 @@ build (size_t argc, const char* argv[])
bkp_step, bkp_status, aux_env, last_cmd,
"-V",
"create(" + host_conf.representation () + ",cc)",
- "config.config.load=~host",
+ "config.config.load=~host-no-warnings",
"config.config.persist+='config.*'@unused=drop");
if (!r.status)
@@ -2592,9 +2592,14 @@ build (size_t argc, const char* argv[])
// Create the module configuration.
//
{
- // b create(<dir>) config.config.load=~build2 [<env-config-args>
- // <tgt-config-args>
- // <pkg-config-args>]
+ // b create(<dir>) config.config.load=~build2[-no-warnings]
+ // [<env-config-args>
+ // <tgt-config-args>
+ // <pkg-config-args>]
+ //
+ // If the main package is not a build system module or the
+ // configuration is not self-hosted, then we load the
+ // ~build2-no-warnings configuration rather than ~build2.
//
// Note also that we suppress warnings about unused config.* values.
//
@@ -2634,7 +2639,9 @@ build (size_t argc, const char* argv[])
bkp_step, bkp_status, aux_env, last_cmd,
"-V",
"create(" + module_conf.representation () + ',' + mods + ')',
- "config.config.load=~build2",
+ (module_pkg && selfhost
+ ? "config.config.load=~build2"
+ : "config.config.load=~build2-no-warnings"),
"config.config.persist+='config.*'@unused=drop",
eas,
cas,
@@ -2675,9 +2682,9 @@ build (size_t argc, const char* argv[])
mods += m;
}
- // b create(<dir>) config.config.load=~build2 [<env-config-args>
- // <tgt-config-args>
- // <pkg-config-args>]
+ // b create(<dir>) config.config.load=~build2 <env-config-args>
+ // <tgt-config-args>
+ // <pkg-config-args>
//
r.status |= run_b (
b,
@@ -4972,7 +4979,7 @@ build (size_t argc, const char* argv[])
//
if (create_module)
{
- // b create(<dir>) config.config.load=~build2
+ // b create(<dir>) config.config.load=~build2-no-warnings
//
step_id b (step_id::bpkg_test_separate_installed_create);
@@ -4982,7 +4989,7 @@ build (size_t argc, const char* argv[])
bkp_step, bkp_status, aux_env, last_cmd,
"-V",
"create(" + module_conf.representation () + ",cc)",
- "config.config.load=~build2",
+ "config.config.load=~build2-no-warnings",
"config.config.persist+='config.*'@unused=drop");
if (!r.status)
diff --git a/doc/manual.cli b/doc/manual.cli
index 2fa3248..64f2179 100644
--- a/doc/manual.cli
+++ b/doc/manual.cli
@@ -1505,7 +1505,7 @@ Worker script for \c{host} packages:
{
# [bpkg.create]
#
- b -V create(<host-conf>, cc) config.config.load=~host
+ b -V create(<host-conf>, cc) config.config.load=~host-no-warnings
bpkg -v create --existing --type host -d <host-conf>
}
@@ -1549,7 +1549,7 @@ bpkg -v fetch -d <host-conf> --trust <repository-fp>
# [bpkg.create]
#
- b -V create(<module-conf>, cc) config.config.load=~build2
+ b -V create(<module-conf>, cc) config.config.load=~build2-no-warnings
bpkg -v create --existing --type build2 -d <module-conf>
# [bpkg.link]
@@ -1801,7 +1801,9 @@ bpkg -v update -d <host-conf> <package-name>
# [bpkg.test-separate-installed.create]
#
- b -V create(<module-conf>, cc) config.config.load=~build2
+ b -V create(<module-conf>, cc) \\
+ config.config.load=~build2-no-warnings
+
bpkg -v create --existing --type build2 -d <module-conf>
# [bpkg.test-separate-installed.link]
@@ -1934,7 +1936,7 @@ Worker script for \c{module} packages:
{
# [bpkg.create]
#
- b -V create(<module-conf>, cc) config.config.load=~build2
+ b -V create(<module-conf>, cc) config.config.load=~build2-no-warnings
bpkg -v create --existing --type build2 -d <module-conf>
}
@@ -1976,7 +1978,7 @@ bpkg -v fetch -d <module-conf> --trust <repository-fp>
# [bpkg.create]
#
- b -V create(<host-conf>, cc) config.config.load=~host
+ b -V create(<host-conf>, cc) config.config.load=~host-no-warnings
bpkg -v create --existing --type host -d <host-conf>
# [bpkg.link]
@@ -2146,7 +2148,9 @@ bpkg -v update -d <module-conf> <package-name>
{
# [bpkg.test-separate-installed.create]
#
- b -V create(<module-conf>, cc) config.config.load=~build2
+ b -V create(<module-conf>, cc) \\
+ config.config.load=~build2-no-warnings
+
bpkg -v create --existing --type build2 -d <module-conf>
# bpkg.test-separate-installed.create (
diff --git a/tests/integration/testscript b/tests/integration/testscript
index 988859f..2dcd849 100644
--- a/tests/integration/testscript
+++ b/tests/integration/testscript
@@ -64,7 +64,7 @@ b.test-installed.configure:\"config.cc.loptions=-L'$~/install/lib'\" \
bpkg.test-separate-installed.create:\"config.cc.loptions=-L'$~/install/lib'\""
pkg = libhello
-ver = 1.0.0+11
+ver = 1.0.0+12
#rep_url = "https://git.build2.org/hello/libhello.git#1.0"
#rep_type = git
rep_url = https://stage.build2.org/1
@@ -153,14 +153,14 @@ rfp = yes
#
#\
pkg = libbuild2-hello
-ver = 0.1.0
+ver = 0.2.0
rep_url = "https://github.com/build2/libbuild2-hello.git#master"
rep_type = git
#rep_url = https://stage.build2.org/1
#rep_type = pkg
rfp = yes
-tests="tests: * libbuild2-hello-tests == $ver"
-host='host: true'
+tests = "tests: * libbuild2-hello-tests == $ver"
+host = 'host: true'
#\
#package_config = 'package-config: -bpkg.install:'
#\
@@ -175,7 +175,7 @@ bpkg.module.create:config.bin.rpath=[null]
#
#\
pkg = libbuild2-kconfig
-ver = 0.3.0-a.0.20221118053819.f702eb65da87
+ver = 0.3.0
rep_url = "https://github.com/build2/libbuild2-kconfig.git#master"
rep_type = git
#ver = 0.1.0-a.0.20200910053253.a71aa3f3938b
@@ -409,7 +409,7 @@ rfp = yes
#\
pkg = libodb-sqlite
ver = 2.5.0-b.26.20240131175206.1c7f67f47770
-rep_url = "https://git.codesynthesis.com/var/scm/odb/odb.git#multi-package"
+rep_url = "https://git.codesynthesis.com/var/scm/odb/odb.git"
rep_type = git
rfp = yes
tests="tests: odb-tests == $ver"' ? (!$defined(config.odb_tests.database)) config.odb_tests.database=sqlite'
@@ -424,7 +424,7 @@ package_config = 'package-config:
#\
pkg = libodb-pgsql
ver = 2.5.0-b.26.20240131175206.1c7f67f47770
-rep_url = "https://git.codesynthesis.com/var/scm/odb/odb.git#multi-package"
+rep_url = "https://git.codesynthesis.com/var/scm/odb/odb.git"
rep_type = git
rfp = yes
tests="tests: odb-tests == $ver"' ? (!$defined(config.odb_tests.database)) config.odb_tests.database=pgsql'
@@ -439,7 +439,7 @@ package_config = 'package-config:
#\
pkg = odb-tests
ver = 2.5.0-b.26.20240131175206.1c7f67f47770
-rep_url = "https://git.codesynthesis.com/var/scm/odb/odb.git#multi-package"
+rep_url = "https://git.codesynthesis.com/var/scm/odb/odb.git"
rep_type = git
rfp = yes
#\
@@ -453,7 +453,7 @@ config.odb_tests.database="sqlite pgsql"
#\
pkg = libodb-oracle
ver = 2.5.0-b.26.20240201133448.3fa01c83a095
-rep_url = "https://git.codesynthesis.com/var/scm/odb/odb.git#multi-package"
+rep_url = "https://git.codesynthesis.com/var/scm/odb/odb.git"
rep_type = git
rfp = yes
package_config = 'package-config:
@@ -465,7 +465,7 @@ config.cc.poptions+=-I/usr/include/oracle/12.2/client64 config.cc.loptions+=-L/u
#\
pkg = libodb-qt
ver = 2.5.0-b.26.20240201180613.633ad7ccad39
-rep_url = "https://git.codesynthesis.com/var/scm/odb/odb.git#multi-package"
+rep_url = "https://git.codesynthesis.com/var/scm/odb/odb.git"
rep_type = git
rfp = yes
#\