diff options
-rw-r--r-- | bbot/worker/worker.cxx | 421 | ||||
-rw-r--r-- | doc/manual.cli | 109 | ||||
-rw-r--r-- | tests/integration/testscript | 15 |
3 files changed, 422 insertions, 123 deletions
diff --git a/bbot/worker/worker.cxx b/bbot/worker/worker.cxx index 810797b..e5210f3 100644 --- a/bbot/worker/worker.cxx +++ b/bbot/worker/worker.cxx @@ -883,6 +883,33 @@ run_bpkg (step_id step, verbosity, cmd, forward<A> (a)...); } +template <typename V, typename... A> +static result_status +run_bpkg (step_id step, + const V& envvars, + tracer& t, + string& log, + const function<pre_run_function>& pre_run, + const regexes& warn_detect, + const optional<step_id>& bkp_step, + const optional<result_status>& bkp_status, + const strings& aux_env, + string& last_cmd, + const char* verbosity, + const string& cmd, A&&... a) +{ + return run_cmd (step, + t, + log, + pre_run, + nullptr /* out_str */, path () /* out_file */, + warn_detect, + "bpkg " + cmd, + bkp_step, bkp_status, aux_env, last_cmd, + process_env ("bpkg", envvars), + verbosity, cmd, forward<A> (a)...); +} + template <typename... A> static result_status run_bpkg (step_id step, @@ -1664,6 +1691,38 @@ build (size_t argc, const char* argv[]) if (!rm.status) break; + // If we end up with multiple current configurations (root and install; + // see below), then when running the bpkg-pkg-build command we need to + // specify the configuration for each package explicitly via + // --config-uuid. + // + // While it's tempting to use the --config-name option instead of + // --config-uuid, that wouldn't work well for multiple current + // configurations. For --config-name the configuration search is carried + // out among configurations explicitly linked to the main configuration + // only. That's in contrast to --config-uuid, when the whole configuration + // cluster is searched (see bpkg-pkg-build implementation for details). + // + // Also, the build package configuration may contain the + // configuration-specific dependencies specified using the + // package-specific --config-uuid option. Thus, we do not generate random + // UUIDs but use some predefined values, which the user can refer to in + // the *-build-config package manifest values. + // + // Note, though, that currently there is no way to customarily configure a + // dependency in the private host and build2 configurations specifically. + // In the future we may support that by, for example, creating such a + // host/build2 configuration explicitly (making it not private) if any + // dependency needs to be configured in it. + // + const char* target_uuid ("00000000-0000-0000-0000-000000000001"); + const char* host_uuid ("00000000-0000-0000-0000-000000000002"); + const char* module_uuid ("00000000-0000-0000-0000-000000000003"); + const char* install_uuid ("00000000-0000-0000-0000-000000000004"); + const char* target_installed_uuid ("00000000-0000-0000-0000-000000000005"); + const char* host_installed_uuid ("00000000-0000-0000-0000-000000000006"); + const char* module_installed_uuid ("00000000-0000-0000-0000-000000000007"); + // Parse the build package configuration represented as a whitespace // separated list of the following potentially quoted bpkg-pkg-build // command arguments: @@ -1707,6 +1766,12 @@ build (size_t argc, const char* argv[]) // other than the main and external test package names are silently // ignored. // + // - The configuration-specific dependencies, potentially with the + // dependency-specific configuration variables (pkg_config_deps). + // Configured in configurations specified by their package-specific + // --config-uuid=<uuid> options (see the above *_uuid variables for the + // recognized configuration UUIDs). + // multimap<string, string> pkg_args; strings pkg_config_opts; strings pkg_config_vars; @@ -1714,6 +1779,87 @@ build (size_t argc, const char* argv[]) vector<pair<string, strings>> pkg_config_glob_deps; // ?sys:<pkg> map<string, strings> pkg_config_pkgs; // <pkg> + // { --config-uuid=<uuid>... }+ (?[sys:]<pkg> | sys:<pkg>) + // + // Maps configuration UUIDs to dependencies, potentially, with the + // package-specific configuration variables. + // + map<string, vector<pair<string, strings>>> pkg_config_deps; + + // Return true if any configuration-specific dependencies need to be + // configured in the specified configuration. + // + auto config_deps = [&pkg_config_deps] (const char* conf_uuid) + { + return pkg_config_deps.find (conf_uuid) != pkg_config_deps.end (); + }; + + // Add configuration-specific dependencies with the dependency-specific + // configuration variables, if present, to the arguments list. Return true + // if any dependency has been added to the list. + // + auto add_config_deps = [&pkg_config_deps] (const char* conf_uuid, + strings& args) + { + bool r (false); + auto i (pkg_config_deps.find (conf_uuid)); + + if (i != pkg_config_deps.end ()) + { + const vector<pair<string, strings>>& deps (i->second); + + // Add dependencies which have some configuration variables specified + // and count the number of others. + // + // ({ --config-uuid <uuid> <var>... }+ <pkg>)... + // + size_t no_vars (0); + for (const pair<string, strings>& d: deps) + { + if (!d.second.empty ()) + { + args.push_back ("{"); + args.push_back ("--config-uuid"); + args.push_back (conf_uuid); + args.insert (args.end (), d.second.begin (), d.second.end ()); + args.push_back ("}+"); + + args.push_back (d.first); + } + else + ++no_vars; + } + + // Add dependencies which have no configuration variables specified. + // + // { --config-uuid <uuid> }+ { <pkg>... } + // + if (no_vars != 0) + { + args.push_back ("{"); + args.push_back ("--config-uuid"); + args.push_back (conf_uuid); + args.push_back ("}+"); + + if (no_vars != 1) + args.push_back ("{"); + + for (const pair<string, strings>& d: deps) + { + if (d.second.empty ()) + args.push_back (d.first); + } + + if (no_vars != 1) + args.push_back ("}"); + } + + r = true; + } + + return r; + }; + if (!tm.package_config.empty ()) { struct abort {}; @@ -1830,20 +1976,46 @@ build (size_t argc, const char* argv[]) // regardless whether it is prefixed with '?' or not. // strings vars; + strings uuids; while (ag.more ()) { string da (unquote (ag.next ())); - if (!var (da)) - fail ("argument is not a configuration variable for " - "dependency " + a + ": '" + da + '\''); - vars.push_back (move (da)); + if (da.compare (0, 14, "--config-uuid=") == 0) + { + string uuid (da, 14); + + if (uuid != target_uuid && + uuid != host_uuid && + uuid != module_uuid && + uuid != install_uuid && + uuid != target_installed_uuid && + uuid != host_installed_uuid && + uuid != module_installed_uuid) + fail ("unrecognized configuration UUID '" + uuid + '\''); + + uuids.push_back (move (uuid)); + } + else if (var (da)) + { + vars.push_back (move (da)); + } + else + { + fail ("argument is not a configuration variable nor " + "configuration UUID for dependency " + a + ": '" + da + + '\''); + } } - // Add the system dependency packages (prefixed with `?sys:`) to - // a separate list, to specify them globally on the - // bpkg-pkg-build command line for configuring them in all the - // (being) created configurations. + // Add the system dependency packages (prefixed with `?sys:`) with + // no configuration specified to a separate list, to be specified + // globally on the bpkg-pkg-build command line for configuring + // them in all the (being) created configurations. Add the + // configuration-specific dependency packages to the + // per-configuration lists, to be specified on the bpkg-pkg-build + // command line for configuring them in the specific + // configurations. // // Note, though, that we will handle the build-to-hold system // packages (prefixed with `sys:`) in the same way as non system @@ -1856,30 +2028,51 @@ build (size_t argc, const char* argv[]) // sure that these dependencies are also auto-configured for the // private configurations potentially created by bpkg-pkg-build. // - // Also note that in the future we may allow package-specific - // --config-uuid options to only configure such packages in the - // specified configurations. We may also invent the special - // 00000000-0000-0000-0000-000000000005 configuration id to, for - // example, only configure them at the - // bpkg.test-separate-installed.configure.build step. + + // If the specified dependency is configuration-specific, then add + // it to the configuration-specific lists and to the specified list + // otherwise. + // + // Note: moves out entries from uuids list. // - if (a.compare (0, 5, "?sys:") == 0) // Global system dependency. + auto add_dep = [&a, &vars, &uuids, &pkg_config_deps] + (vector<pair<string, strings>>& non_cfg_spec_deps) { - pkg_config_glob_deps.push_back (make_pair (move (a), - move (vars))); + if (!uuids.empty ()) + { + for (string& uuid: uuids) + pkg_config_deps[move (uuid)].emplace_back (a, vars); + } + else + non_cfg_spec_deps.emplace_back (move (a), move (vars)); + }; + + // Configuration-specific or global package dependency. + // + if (a.compare (0, 5, "?sys:") == 0) + { + add_dep (pkg_config_glob_deps); } - else if (a[0] == '?' || // Main package dependency. - a.compare (0, 4, "sys:") == 0) + // + // Configuration-specific or main package dependency. + // + else if (a[0] == '?' || a.compare (0, 4, "sys:") == 0) { - pkg_config_main_deps.push_back (make_pair (move (a), - move (vars))); + add_dep (pkg_config_main_deps); } - else // Build-to-hold package. + // + // Build-to-hold package. + // + else { if (vars.empty ()) fail ("no configuration variables specified for package '" + a + '\''); + if (!uuids.empty ()) + fail ("configuration UUID cannot be specified for " + "build-to-hold package '" + a + '\''); + auto i (pkg_config_pkgs.find (a)); if (i == pkg_config_pkgs.end ()) @@ -2448,9 +2641,9 @@ build (size_t argc, const char* argv[]) create_host ? host_conf : module_conf); - // Note that bpkg doesn't support configuring bootstrap module - // dependents well, not distinguishing such modules from regular ones - // (see pkg_configure() for details). Thus, we need to pass the + // Note that bpkg doesn't support configuring bootstrap module dependents + // well, not distinguishing such modules from regular ones (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 @@ -2463,6 +2656,19 @@ build (size_t argc, const char* argv[]) bootstrap_import = "!config.import." + pkg_var + '=' + (rwd / main_pkg_conf).string (); + // Log the configuration UUID as a comment. + // + auto log_conf_uuid = [] (tracer& t, string& log, + const char* uuid, + const char* name) + { + string s (uuid); + s += " - "; + s += name; + + log_comment (t, log, s); + }; + // Configure. // { @@ -2487,26 +2693,6 @@ build (size_t argc, const char* argv[]) // change_wd (trace, &r.log, rwd); - // If we end up with multiple current configurations (root and install) - // then when running the bpkg-pkg-build command we need to specify the - // configuration for each package explicitly via --config-uuid. - // - // While it's tempting to use the --config-name option instead of - // --config-uuid, that wouldn't work well for multiple current - // configurations. For --config-name the configuration search is carried - // out among configurations explicitly linked to the main configuration - // only. That's in contrast to --config-uuid, when the whole - // configuration cluster is searched (see bpkg-pkg-build implementation - // for details). - // - // Let's not generate random UUIDs but use some predefined values which - // we can easily recognize in the build logs. - // - const char* target_uuid ("00000000-0000-0000-0000-000000000001"); - const char* host_uuid ("00000000-0000-0000-0000-000000000002"); - const char* module_uuid ("00000000-0000-0000-0000-000000000003"); - const char* install_uuid ("00000000-0000-0000-0000-000000000004"); - // Let's however distinguish the target package as a simple common case // and simplify the configuration creation and packages configuration // commands making them more readable in the build log. For this simple @@ -2534,7 +2720,9 @@ build (size_t argc, const char* argv[]) "-V", "create", "-d", target_conf, - !target_pkg ? cstrings ({"--uuid", target_uuid}) : cstrings (), + (!target_pkg || config_deps (target_uuid) + ? cstrings ({"--uuid", target_uuid}) + : cstrings ()), step_args (modules, s, f1, f2), step_args (env_args, s, f1, f2), step_args (tgt_args, s, f1, f2), @@ -3073,11 +3261,13 @@ build (size_t argc, const char* argv[]) // <pkg-config-args> // <pkg-config-opts> // -- - // { <pkg-config-vars>|config.<pkg-name>.develop=false }+ <pkg> - // { <rtt-config-vars>|config.<runtime-test-name>.develop=false }+ <runtime-test>... - // { <dep-config-vars> }+ <main-dep>... - // <main-dep>... - // <glob-dep>... + // { <pkg-config-vars>|config.<pkg-name>.develop=false }+ <pkg> + // { <rtt-config-vars>|config.<runtime-test-name>.develop=false }+ <runtime-test>... + // { <dep-config-vars> }+ <main-dep>... + // <main-dep>... + // <glob-dep>... + // { <target-config> <dep-config-vars> }+ <dep>... + // { <target-config> }+ { <dep>... } // step_id s (step_id::bpkg_target_configure_build); step_id f1 (step_id::b_configure); @@ -3197,6 +3387,8 @@ build (size_t argc, const char* argv[]) // { <build-config> <install-config> <dep-config-vars> }+ <main-dep>... // { <build-config> <install-config> }+ { <main-dep>... } // <glob-dep>... + // { <(target|host|module|install)-config> <dep-config-vars> }+ <dep>... + // { <(target|host|module|install)-config> }+ { <dep>... }... // // Main package configuration name. @@ -3395,6 +3587,8 @@ build (size_t argc, const char* argv[]) // Add dependencies which have some configuration variables // specified and count the number of others. // + // ({ --config-uuid=<uuid>... <var>... }+ <pkg>)... + // size_t no_vars (0); for (const pair<string, strings>& d: pkg_config_main_deps) { @@ -3423,6 +3617,8 @@ build (size_t argc, const char* argv[]) // Add dependencies which have no configuration variables specified. // + // { --config-uuid=<uuid>... }+ { <pkg>... } + // if (no_vars != 0) { pkgs.push_back ("{"); @@ -3458,6 +3654,24 @@ build (size_t argc, const char* argv[]) for (const pair<string, strings>& d: pkg_config_glob_deps) pkgs.push_back (d.first); + // Only log configuration UUIDs if they are specified on the command + // line. + // + bool log_uuids (!target_pkg); + + // Add the configuration-specific dependencies. + // + // Note that while it's tempting to optimize by omitting the + // --config-uuid option for a simple target configuration only case, + // that would change the semantics since ?sys:<dependency> would + // potentially be configured in the private host and module + // configurations in this case. + // + log_uuids = add_config_deps (target_uuid, pkgs) || log_uuids; + log_uuids = add_config_deps (host_uuid, pkgs) || log_uuids; + log_uuids = add_config_deps (module_uuid, pkgs) || log_uuids; + log_uuids = add_config_deps (install_uuid, pkgs) || log_uuids; + // Finally, configure all the packages. // { @@ -3466,40 +3680,27 @@ build (size_t argc, const char* argv[]) optional<string> dependency_checksum; - // Only log configuration UUIDs if they are specified on the command - // line. - // - function<pre_run_function> log_uuids ( - [&r, &trace, - target_uuid, host_uuid, module_uuid, install_uuid, - target_pkg] () - { - if (!target_pkg) - { - auto log = [&r, &trace] (const char* uuid, const char* name) - { - string s (uuid); - s += " - "; - s += name; + function<pre_run_function> log_uuids_func; - log_comment (trace, r.log, s); - }; - - log_comment (trace, r.log, ""); - - log (target_uuid, "target"); - log (host_uuid, "host"); - log (module_uuid, "module"); - log (install_uuid, "install"); - - log_comment (trace, r.log, ""); - } - }); + if (log_uuids) + { + log_uuids_func = [&r, &trace, + target_uuid, host_uuid, module_uuid, install_uuid, + &log_conf_uuid] () + { + log_comment (trace, r.log, ""); + log_conf_uuid (trace, r.log, target_uuid, "target"); + log_conf_uuid (trace, r.log, host_uuid, "host"); + log_conf_uuid (trace, r.log, module_uuid, "module"); + log_conf_uuid (trace, r.log, install_uuid, "install"); + log_comment (trace, r.log, ""); + }; + } r.status |= run_bpkg ( b, trace, r.log, - log_uuids, + log_uuids_func, dependency_checksum, wre, bkp_step, bkp_status, aux_env, last_cmd, @@ -5062,6 +5263,9 @@ build (size_t argc, const char* argv[]) "-V", "create", "-d", target_conf, + (config_deps (target_installed_uuid) + ? cstrings ({"--uuid", target_installed_uuid}) + : cstrings ()), step_args (modules, s, f), step_args (env_args, s, f), step_args (tgt_args, s, f), @@ -5100,6 +5304,9 @@ build (size_t argc, const char* argv[]) "-d", host_conf, "--type", "host", "--name", "host", + (config_deps (host_installed_uuid) + ? cstrings ({"--uuid", host_installed_uuid}) + : cstrings ()), step_args (modules, s, f), step_args (env_args, s, f), step_args (tgt_args, s, f), @@ -5144,7 +5351,10 @@ build (size_t argc, const char* argv[]) "--existing", "-d", module_conf, "--type", "build2", - "--name", "module"); + "--name", "module", + (config_deps (module_installed_uuid) + ? cstrings ({"--uuid", module_installed_uuid}) + : cstrings ())); if (!r.status) break; @@ -5370,14 +5580,14 @@ build (size_t argc, const char* argv[]) // Configure all the packages using a single bpkg-pkg-build command. // - // bpkg build --configure-only <env-config-args> - // <tgt-config-args> - // <pkg-config-args> - // { <config> <rtt-config-vars> }+ <runtime-test>... - // { <config> }+ { <runtime-test>... } - // { <btt-config-vars> }+ <buildtime-test>... - // ?sys:<pkg> - // <glob-dep>... + // bpkg build --configure-only <env-config-args> <tgt-config-args> <pkg-config-args> + // { <build-installed-config> <rtt-config-vars> }+ <runtime-test>... + // { <build-installed-config> }+ { <runtime-test>... } + // { <btt-config-vars> }+ <buildtime-test>... + // ?sys:<pkg> + // <glob-dep>... + // { <(target|host|module)-installed-config> <dep-config-vars> }+ <dep>... + // { <(target|host|module)-installed-config> }+ { <dep>... }... // strings pkgs; @@ -5497,6 +5707,17 @@ build (size_t argc, const char* argv[]) for (const pair<string, strings>& d: pkg_config_glob_deps) pkgs.push_back (d.first); + // Only log configuration UUIDs if they are specified on the + // command line. + // + bool log_uuids (false); + + // Add the configuration-specific dependencies. + // + log_uuids = add_config_deps (target_installed_uuid, pkgs) || log_uuids; + log_uuids = add_config_deps (host_installed_uuid, pkgs) || log_uuids; + log_uuids = add_config_deps (module_installed_uuid, pkgs) || log_uuids; + // Finally, configure all the test packages. // { @@ -5513,10 +5734,30 @@ build (size_t argc, const char* argv[]) step_id f (step_id::bpkg_test_separate_installed_configure_build); + function<pre_run_function> log_uuids_func; + + if (log_uuids) + { + log_uuids_func = [&r, &trace, + target_installed_uuid, + host_installed_uuid, + module_installed_uuid, + &log_conf_uuid] () + { + log_comment (trace, r.log, ""); + log_conf_uuid (trace, r.log, target_installed_uuid, "target installed"); + log_conf_uuid (trace, r.log, host_installed_uuid, "host installed"); + log_conf_uuid (trace, r.log, module_installed_uuid, "module installed"); + log_comment (trace, r.log, ""); + }; + } + r.status |= run_bpkg ( b, envvars, - trace, r.log, wre, + trace, r.log, + log_uuids_func, + wre, bkp_step, bkp_status, aux_env, last_cmd, "-v", "build", diff --git a/doc/manual.cli b/doc/manual.cli index 64f2179..1fb0184 100644 --- a/doc/manual.cli +++ b/doc/manual.cli @@ -1191,7 +1191,18 @@ environment though some are assigned by the worker during the script execution \c{<pkg-config-opts>} (unprefixed options), \c{<pkg-config-vars>} (unprefixed variables), \c{<dependency-name>}, \c{<dependency-version-constraint>}, and \c{<dep-config-vars>} values result from parsing the -\l{#arch-task-package-config \c{package-config}} task manifest value. +\l{#arch-task-package-config \c{package-config}} task manifest value. The +\c{<*-uuid>} values are assigned as follows: + +\ +target-uuid: 00000000-0000-0000-0000-000000000001 +host-uuid: 00000000-0000-0000-0000-000000000002 +module-uuid: 00000000-0000-0000-0000-000000000003 +install-uuid: 00000000-0000-0000-0000-000000000004 +target-installed-uuid: 00000000-0000-0000-0000-000000000005 +host-installed-uuid: 00000000-0000-0000-0000-000000000006 +module-installed-uuid: 00000000-0000-0000-0000-000000000007 +\ Some prefix step ids have fallback step ids which are used in the absence of the primary step id values. If the prefix step id differs from the breakpoint @@ -1229,7 +1240,7 @@ Worker script for \c{target} packages: \ # bpkg.create (bpkg.target.create : b.create, bpkg.create) # -bpkg -V create <env-modules> \\ +bpkg -V create --uuid <target-uuid> <env-modules> \\ <env-config-args> <tgt-config-args> <pkg-config-args> # bpkg.configure.add @@ -1253,7 +1264,9 @@ bpkg -v build --configure-only \\ [([{ <dep-config-vars> }+] \\ (?|sys:)<dependency-name> \\ [<dependency-version-constraint>])...] \\ - [?sys:<dependency-name>[ <dependency-version-constraint>]...] + [?sys:<dependency-name>[ <dependency-version-constraint>]...] \\ + [({ --config-uuid <target-uuid> [<dep-config-vars>] }+ \\ + (?[sys:]|sys:)<dependency-name>[ <dependency-version-constraint>])...] # bpkg.update # @@ -1389,7 +1402,7 @@ bpkg -v update <package-name> # bpkg.test-separate-installed.create_for_target : # bpkg.test-separate-installed.create) # - bpkg -V create <env-modules> \\ + bpkg -V create --uuid <target-installed-uuid> <env-modules> \\ <env-config-args> <tgt-config-args> <pkg-config-args> # bpkg.test-separate-installed.configure.add ( @@ -1412,7 +1425,11 @@ bpkg -v update <package-name> ([{ <test-config-vars> }+] \\ <test-package-name>[ <test-version-constraint>])... \\ ?sys:<package-name>/<package-version> \\ - [?sys:<dependency-name>[ <dependency-version-constraint>]...] + [?sys:<dependency-name>[ <dependency-version-constraint>]...] \\ + [({ --config-uuid <target-installed-uuid> \\ + [<dep-config-vars>] }+ \\ + (?[sys:]|sys:)<dependency-name> \\ + [<dependency-version-constraint>])...] # For each (runtime) tests, examples, or benchmarks package # referred to by the task manifest: @@ -1496,8 +1513,9 @@ Worker script for \c{host} packages: { # bpkg.create (bpkg.host.create : b.create, bpkg.create) # - bpkg -V create --type host -d <host-conf> <env-modules> \\ - <env-config-args> <tgt-config-args> <pkg-config-args> + bpkg -V create --type host -d <host-conf> --uuid <host-uuid> \\ + <env-modules> <env-config-args> <tgt-config-args> \\ + <pkg-config-args> } # # Otherwise: @@ -1506,7 +1524,9 @@ Worker script for \c{host} packages: # [bpkg.create] # b -V create(<host-conf>, cc) config.config.load=~host-no-warnings - bpkg -v create --existing --type host -d <host-conf> + + bpkg -v create --existing --type host -d <host-conf> \\ + --uuid <host-uuid> } # bpkg.configure.add @@ -1522,7 +1542,7 @@ bpkg -v fetch -d <host-conf> --trust <repository-fp> { # bpkg.create (bpkg.target.create : b.create, bpkg.create) # - bpkg -V create -d <install-conf> <env-modules> \\ + bpkg -V create -d <install-conf> --uuid <install-uuid> <env-modules> \\ <env-config-args> <tgt-config-args> <pkg-config-args> # [bpkg.link] @@ -1544,13 +1564,15 @@ bpkg -v fetch -d <host-conf> --trust <repository-fp> { # bpkg.create (bpkg.target.create : b.create, bpkg.create) # - bpkg -V create -d <target-conf> <env-modules> \\ + bpkg -V create -d <target-conf> --uuid <target-uuid> <env-modules> \\ <env-config-args> <tgt-config-args> <pkg-config-args> # [bpkg.create] # b -V create(<module-conf>, cc) config.config.load=~build2-no-warnings - bpkg -v create --existing --type build2 -d <module-conf> + + bpkg -v create --existing --type build2 -d <module-conf> \\ + --uuid <module-uuid> # [bpkg.link] # @@ -1620,7 +1642,11 @@ bpkg -v build --configure-only \\ [<dep-config-vars>] }+ \\ (?|sys:)<dependency-name>[ <dependency-version-constraint>])... \\ \\ -[?sys:<dependency-name>[ <dependency-version-constraint>]...] +[?sys:<dependency-name>[ <dependency-version-constraint>]...] \\ +\\ +({ (--config-uuid <(target|host|module|install)-uuid>)... \\ + [<dep-config-vars>] }+ \\ + (?[sys:]|sys:)<dependency-name>[ <dependency-version-constraint>])... # bpkg.update # @@ -1770,7 +1796,8 @@ bpkg -v update -d <host-conf> <package-name> # bpkg.test-separate-installed.create_for_host : # bpkg.test-separate-installed.create) # - bpkg -V create --type host -d <host-conf> <env-modules> \\ + bpkg -V create --type host -d <host-conf> \\ + --uuid <host-installed-uuid> <env-modules> \\ <env-config-args> <tgt-config-args> <pkg-config-args> # If task manifest refers to any runtime tests, examples, or @@ -1796,15 +1823,17 @@ bpkg -v update -d <host-conf> <package-name> # bpkg.test-separate-installed.create_for_host : # bpkg.test-separate-installed.create) # - bpkg -V create -d <target-conf> <env-modules> \\ - <env-config-args> <tgt-config-args> <pkg-config-args> + bpkg -V create -d <target-conf> --uuid <target-installed-uuid> \\ + <env-modules> <env-config-args> <tgt-config-args> \\ + <pkg-config-args> # [bpkg.test-separate-installed.create] # b -V create(<module-conf>, cc) \\ config.config.load=~build2-no-warnings - bpkg -v create --existing --type build2 -d <module-conf> + bpkg -v create --existing --type build2 -d <module-conf> \\ + --uuid <module-installed-uuid> # [bpkg.test-separate-installed.link] # @@ -1842,7 +1871,11 @@ bpkg -v update -d <host-conf> <package-name> \\ ?sys:<package-name>/<package-version> \\ \\ - [?sys:<dependency-name>[ <dependency-version-constraint>]...] + [?sys:<dependency-name>[ <dependency-version-constraint>]...] \\ + \\ + ({ (--config-uuid <(target|host|module)-installed-uuid>)... \\ + [<dep-config-vars>] }+ \\ + (?[sys:]|sys:)<dependency-name>[ <dependency-version-constraint>])... # For each tests, examples, or benchmarks package referred # to by the task manifest: @@ -1928,7 +1961,9 @@ Worker script for \c{module} packages: # b -V create(<module-conf>, <env-modules>) config.config.load=~build2 \\ <env-config-args> <tgt-config-args> <pkg-config-args> - bpkg -v create --existing --type build2 -d <module-conf> + + bpkg -v create --existing --type build2 -d <module-conf> \\ + --uuid <module-uuid> } # # Otherwise: @@ -1937,7 +1972,9 @@ Worker script for \c{module} packages: # [bpkg.create] # b -V create(<module-conf>, cc) config.config.load=~build2-no-warnings - bpkg -v create --existing --type build2 -d <module-conf> + + bpkg -v create --existing --type build2 -d <module-conf> \\ + --uuid <module-uuid> } # bpkg.configure.add @@ -1956,7 +1993,8 @@ bpkg -v fetch -d <module-conf> --trust <repository-fp> b -V create(<install-conf>, <env-modules>) \\ config.config.load=~build2 \\ <env-config-args> <tgt-config-args> <pkg-config-args> - bpkg -v create --existing --type build2 -d <install-conf> + + bpkg -v create --existing -d <install-conf> --uuid <install-uuid> # bpkg.configure.add # @@ -1973,13 +2011,16 @@ bpkg -v fetch -d <module-conf> --trust <repository-fp> { # bpkg.create (bpkg.target.create : b.create, bpkg.create) # - bpkg -V create -d <target-conf> <env-modules> \\ - <env-config-args> <tgt-config-args> <pkg-config-args> + bpkg -V create -d <target-conf> --uuid <target-uuid> \\ + <env-modules> <env-config-args> <tgt-config-args> \\ + <pkg-config-args> # [bpkg.create] # b -V create(<host-conf>, cc) config.config.load=~host-no-warnings - bpkg -v create --existing --type host -d <host-conf> + + bpkg -v create --existing --type host -d <host-conf> \\ + --uuid <host-uuid> # [bpkg.link] # @@ -2035,7 +2076,10 @@ bpkg -v build --configure-only \\ [<dep-config-vars>] }+ \\ (?|sys:)<dependency-name>[ <dependency-version-constraint>])... \\ \\ -[?sys:<dependency-name>[ <dependency-version-constraint>]...] +[?sys:<dependency-name>[ <dependency-version-constraint>]...] \\ +({ (--config-uuid <(target|host|module|install)-uuid>)... \\ + [<dep-config-vars>] }+ \\ + (?[sys:]|sys:)<dependency-name>[ <dependency-version-constraint>])... # bpkg.update # @@ -2151,20 +2195,23 @@ bpkg -v update -d <module-conf> <package-name> b -V create(<module-conf>, cc) \\ config.config.load=~build2-no-warnings - bpkg -v create --existing --type build2 -d <module-conf> + bpkg -v create --existing --type build2 -d <module-conf> \\ + --uuid <module-installed-uuid> # bpkg.test-separate-installed.create ( # bpkg.test-separate-installed.create_for_module : # bpkg.test-separate-installed.create) # - bpkg -V create -d <target-conf> <env-modules> \\ - <env-config-args> <tgt-config-args> <pkg-config-args> + bpkg -V create -d <target-conf> --uuid <target-installed-uuid> \\ + <env-modules> <env-config-args> <tgt-config-args> \\ + <pkg-config-args> # bpkg.test-separate-installed.create ( # bpkg.test-separate-installed.create_for_module : # bpkg.test-separate-installed.create) # - bpkg -V create --type host -d <host-conf> <env-modules> \\ + bpkg -V create --type host -d <host-conf> \\ + --uuid <host-installed-uuid> <env-modules> \\ <env-config-args> <tgt-config-args> <pkg-config-args> # [bpkg.test-separate-installed.link] @@ -2196,7 +2243,11 @@ bpkg -v update -d <module-conf> <package-name> \\ ?sys:<package-name>/<package-version> \\ \\ - [?sys:<dependency-name>[ <dependency-version-constraint>]...] + [?sys:<dependency-name>[ <dependency-version-constraint>]...] \\ + \\ + ({ (--config-uuid <(target|host|module)-installed-uuid>)... \\ + [<dep-config-vars>] }+ \\ + (?[sys:]|sys:)<dependency-name>[ <dependency-version-constraint>])... # For each (build-time) tests, examples, or benchmarks package # referred to by the task manifest: diff --git a/tests/integration/testscript b/tests/integration/testscript index bf40718..bcf67d8 100644 --- a/tests/integration/testscript +++ b/tests/integration/testscript @@ -406,16 +406,23 @@ rep_type = git rfp = yes #\ -#\ + pkg = libodb-sqlite -ver = 2.5.0-b.28.20241009172401.fa4b44129d84 -rep_url = "https://git.codesynthesis.com/var/scm/odb/odb.git#master" +ver = 2.5.0-b.28.20241030072332.1de3f3f222ba +rep_url = "https://git.codesynthesis.com/var/scm/odb/odb.git#win-bin" rep_type = git rfp = yes tests="tests: odb-tests == $ver"' ? (!$defined(config.odb_tests.database)) config.odb_tests.database=sqlite tests: odb-examples == '"$ver"' ? (!$defined(config.odb_examples.database)) config.odb_examples.database=sqlite' -#\ +# Configure libodb as a system dependency on the +# bpkg.test-separate-installed.configure.build step, since it is already +# installed as a dependency of libodb-sqlite. +# +package_config = 'package-config: +\ +{ --config-uuid=00000000-0000-0000-0000-000000000005 }+ ?sys:libodb/* +\' #\ package_config = 'package-config: \ |