aboutsummaryrefslogtreecommitdiff
path: root/bpkg/pkg-build.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'bpkg/pkg-build.cxx')
-rw-r--r--bpkg/pkg-build.cxx18
1 files changed, 13 insertions, 5 deletions
diff --git a/bpkg/pkg-build.cxx b/bpkg/pkg-build.cxx
index 977c8d9..88d74cc 100644
--- a/bpkg/pkg-build.cxx
+++ b/bpkg/pkg-build.cxx
@@ -1348,19 +1348,27 @@ namespace bpkg
// update
//
+ // Here we want to update all the packages at once, to facilitate
+ // parallelism.
+ //
+ vector<pkg_command_vars> upkgs;
+
for (const build_package& p: reverse_iterate (pkgs))
{
const shared_ptr<selected_package>& sp (p.selected);
// Update the user selection only.
//
- if (find (names.begin (), names.end (), sp->name) == names.end ())
- continue;
+ if (find (names.begin (), names.end (), sp->name) != names.end ())
+ upkgs.push_back (pkg_command_vars {sp, strings ()});
+ }
- pkg_update (c, o, sp);
+ pkg_update (c, o, strings (), upkgs);
- if (verb)
- text << "updated " << sp->name << " " << sp->version;
+ if (verb)
+ {
+ for (const pkg_command_vars& pv: upkgs)
+ text << "updated " << pv.pkg->name << " " << pv.pkg->version;
}
return 0;