From 015bc5f163391990d0f0b4ee0e1226dee43eba04 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 10 Oct 2015 17:57:19 +0200 Subject: Add --configure-only|-c option to build command --- bpkg/build-options.cli | 8 ++++++++ bpkg/build.cxx | 17 ++++++++++------- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/bpkg/build-options.cli b/bpkg/build-options.cli index 8366d35..f2c9e23 100644 --- a/bpkg/build-options.cli +++ b/bpkg/build-options.cli @@ -23,6 +23,9 @@ the package can be specified as either the path to the package source archive () or package source directory (). See \cb{pkg-fetch} and \cb{pkg-unpack} for more information on the semantics of specifying the package as an archive or directory. + +The \cb{build} command also supports several \cb{--*-only} options +that allow you to limit the amount of work that will be done. */ namespace bpkg @@ -34,6 +37,11 @@ namespace bpkg "Assume the answer to all prompts is \cb{yes}." }; + bool --configure-only|-c + { + "Configuring all the packages but don't update." + }; + bool --print-only|-p { "Print to \cb{STDOUT} what would be done without actually doing diff --git a/bpkg/build.cxx b/bpkg/build.cxx index eda1199..10f668b 100644 --- a/bpkg/build.cxx +++ b/bpkg/build.cxx @@ -1141,16 +1141,19 @@ namespace bpkg // update // - for (const satisfied_package& p: reverse_iterate (pkgs)) + if (!o.configure_only ()) { - const shared_ptr& sp (p.selected); + for (const satisfied_package& p: reverse_iterate (pkgs)) + { + const shared_ptr& sp (p.selected); - // @@ TODO: update user selection only. - // - pkg_update (c, sp); + // @@ TODO: update the user selection only. + // + pkg_update (c, sp); - if (verb) - text << "updated " << sp->name << " " << sp->version; + if (verb) + text << "updated " << sp->name << " " << sp->version; + } } } } -- cgit v1.1