aboutsummaryrefslogtreecommitdiff
path: root/bpkg/pkg-build-collect.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2023-02-01 11:42:31 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2023-02-01 11:42:31 +0200
commit546391dab6173660acceba6404136e9411ce1388 (patch)
tree79da333fd1f7447c6b9490565f520d1d79a329b7 /bpkg/pkg-build-collect.hxx
parent724131b7e03934664621f86df2dc2285ff43dba8 (diff)
Implement system package manager query and install support for Debian
Diffstat (limited to 'bpkg/pkg-build-collect.hxx')
-rw-r--r--bpkg/pkg-build-collect.hxx23
1 files changed, 22 insertions, 1 deletions
diff --git a/bpkg/pkg-build-collect.hxx b/bpkg/pkg-build-collect.hxx
index e47d9fa..6c79abe 100644
--- a/bpkg/pkg-build-collect.hxx
+++ b/bpkg/pkg-build-collect.hxx
@@ -19,8 +19,9 @@
#include <bpkg/common-options.hxx>
#include <bpkg/pkg-build-options.hxx>
-#include <bpkg/pkg-configure.hxx> // find_database_function()
+#include <bpkg/pkg-configure.hxx> // find_database_function()
#include <bpkg/package-skeleton.hxx>
+#include <bpkg/system-package-manager.hxx>
namespace bpkg
{
@@ -210,6 +211,26 @@ namespace bpkg
//
bool system;
+ // 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).
+ //
+ // Note on terminology: We call the bpkg package that is being configured
+ // as available from the system as "system package" and we call the
+ // underlying package managed by the system/distribution package manager
+ // as "system/distribution package". See system-package-manager.hxx for
+ // background.
+ //
+ 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;
+
// If this flag is set and the external package is being replaced with an
// external one, then keep its output directory between upgrades and
// downgrades.