aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bpkg/pkg-build-collect.hxx14
-rw-r--r--bpkg/pkg-build.cxx27
-rw-r--r--bpkg/system-package-manager.hxx5
3 files changed, 28 insertions, 18 deletions
diff --git a/bpkg/pkg-build-collect.hxx b/bpkg/pkg-build-collect.hxx
index f88e3c3..5f64f31 100644
--- a/bpkg/pkg-build-collect.hxx
+++ b/bpkg/pkg-build-collect.hxx
@@ -211,10 +211,16 @@ namespace bpkg
//
bool system;
- // Return the binary distribution package status if this is a system
- // package (re-)configuration, the package version has been resolved via
- // the system package manager, and the binary distribution package needs
- // to be installed. Otherwise, return NULL. So can be used as bool.
+ // Return the system/distribution package status if this is a system
+ // package (re-)configuration and the package is being managed by the
+ // system package manager (as opposed to user/fallback). Otherwise, return
+ // NULL (so can be used as bool).
+ //
+ const system_package_status*
+ system_status () const;
+
+ // As above but only return the status if the package needs to be
+ // installed.
//
const system_package_status*
system_install () const;
diff --git a/bpkg/pkg-build.cxx b/bpkg/pkg-build.cxx
index 08aa1b0..f1cd77a 100644
--- a/bpkg/pkg-build.cxx
+++ b/bpkg/pkg-build.cxx
@@ -4397,14 +4397,17 @@ namespace bpkg
o.plan_specified () ||
o.rebuild_checksum_specified ())
{
- // Map the system package statuses of the binary distribution packages
- // that needs to be installed to the system packages which require their
- // installation (see build_package::system_install() for details).
+ // Map the main system/distribution packages that need to be installed
+ // to the system packages which caused their installation (see
+ // build_package::system_install() for details).
//
- using sys_installs_map =
- map<const system_package_status*, set<package_name>>;
+ // @@ Use main package for key.
+ // @@ Switch set to vector.
+ // @@ Terminology binary distribution package -> system/dis...
+ //
+ using system_map = map<const system_package_status*, set<package_name>>;
- sys_installs_map sys_installs;
+ system_map sys_map;
for (const build_package& p: pkgs)
{
@@ -4421,12 +4424,12 @@ namespace bpkg
// Print the bpkg package action lines.
//
- // Also print the sys_install action lines for system packages which
- // require the binary distribution package installation. Print them
- // before the respected system package action lines, but only once per
- // binary distribution package. For example:
+ // Also print the system-install action lines for system/distribution
+ // packages which require installation by the system package manager.
+ // Print them before the respective system package action lines, but
+ // only once per (main) system/distribution package. For example:
//
- // system_install libssl1.1/1.1.1l (required by sys:libssl, sys:libcrypto)
+ // system-install libssl1.1/1.1.1l (required by sys:libssl, sys:libcrypto)
// configure sys:libssl/1.1.1 (required by foo)
// configure sys:libcrypto/1.1.1 (required by bar)
//
@@ -4443,7 +4446,7 @@ namespace bpkg
if ((s = p.system_install ()) != nullptr &&
(j = sys_installs.find (s)) != sys_installs.end ())
{
- act = "system_install ";
+ act = "system-install ";
act += s->system_name;
act += '/';
act += s->system_version;
diff --git a/bpkg/system-package-manager.hxx b/bpkg/system-package-manager.hxx
index b8511a6..6cf90e5 100644
--- a/bpkg/system-package-manager.hxx
+++ b/bpkg/system-package-manager.hxx
@@ -15,8 +15,9 @@
namespace bpkg
{
- // The system package manager interface. Used by both pkg-build (to query
- // and install system packages) and by pkg-bindist (to build them).
+ // The system/distribution package manager interface. Used by both pkg-build
+ // (to query and install system packages) and by pkg-bindist (to build
+ // them).
//
// Note that currently the result of a query is a single available version.
// While some package managers may support having multiple available