diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2023-07-20 19:45:06 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2023-07-21 11:40:18 +0300 |
commit | 8d6f54f819d857aa89135a2474d5951ef02fd068 (patch) | |
tree | c25b64320e9fbf2d831d8723f5a02cce91c26133 /bdep/sync.cxx | |
parent | 7fa45e22d7f2f47607bbad203a4c48d3b3021724 (diff) |
Fix init and sync commands to consider project packages specified on command line
Diffstat (limited to 'bdep/sync.cxx')
-rw-r--r-- | bdep/sync.cxx | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/bdep/sync.cxx b/bdep/sync.cxx index 45ee46c..46eaf1a 100644 --- a/bdep/sync.cxx +++ b/bdep/sync.cxx @@ -1006,9 +1006,10 @@ namespace bdep // // If we have dep_pkgs (third form), then non-global configuration // variables should only apply to them. Otherwise, if we have origin - // (first form), then they should only apply to packages from the origin - // project in origin configurations. They don't seem to make sense - // otherwise (second form, implicit). + // (first form), then they should only apply to the specified packages or, + // if unspecified, to all packages from the origin project in origin + // configurations. They don't seem to make sense otherwise (second form, + // implicit). // bool dep_vars (false); bool origin_vars (false); @@ -1182,7 +1183,7 @@ namespace bdep } } - bool vars (origin_vars && cfg.origin); + bool vars (origin_vars && cfg.origin && origin_pkg ()); bool g (multi_cfg || vars || dev || disf); if (g) @@ -2134,6 +2135,7 @@ namespace bdep bool fetch, bool yes, bool name_cfg, + const package_locations& prj_pkgs, const sys_options& so, bool create_host_config, bool create_build2_config, @@ -2169,7 +2171,7 @@ namespace bdep nullopt /* upgrade */, nullopt /* recursive */, false /* disfigure */, - package_locations () /* prj_pkgs */, + prj_pkgs, strings () /* dep_pkgs */, strings () /* deinit_pkgs */, so, @@ -2190,6 +2192,7 @@ namespace bdep bool fetch, bool yes, bool name_cfg, + const package_locations& prj_pkgs, const sys_options& so, bool create_host_config, bool create_build2_config) @@ -2247,7 +2250,7 @@ namespace bdep nullopt /* upgrade */, nullopt /* recursive */, false /* disfigure */, - package_locations () /* prj_pkgs */, + prj_pkgs, strings () /* dep_pkgs */, strings () /* deinit_pkgs */, so, @@ -2792,7 +2795,7 @@ namespace bdep nullopt /* upgrade */, nullopt /* recursive */, o.disfigure (), - package_locations () /* prj_pkgs */, + prj_pkgs, strings () /* dep_pkgs */, strings () /* deinit_pkgs */, sys_options (o), |