aboutsummaryrefslogtreecommitdiff
path: root/bpkg/system-package-manager-archive.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2023-03-14 09:32:22 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2023-03-17 08:58:33 +0200
commitafd0b8699b009b96be34ba2a20441ecb223957ce (patch)
tree7b34b0166c994769135b2b10b4f885e0ad124a4e /bpkg/system-package-manager-archive.hxx
parent3cc61ab4a6275428520cb0fb2f18dc3e09aef28a (diff)
Add support for generating installation archives in pkg-bindist
Diffstat (limited to 'bpkg/system-package-manager-archive.hxx')
-rw-r--r--bpkg/system-package-manager-archive.hxx54
1 files changed, 54 insertions, 0 deletions
diff --git a/bpkg/system-package-manager-archive.hxx b/bpkg/system-package-manager-archive.hxx
new file mode 100644
index 0000000..0d27d85
--- /dev/null
+++ b/bpkg/system-package-manager-archive.hxx
@@ -0,0 +1,54 @@
+// file : bpkg/system-package-manager-archive.hxx -*- C++ -*-
+// license : MIT; see accompanying LICENSE file
+
+#ifndef BPKG_SYSTEM_PACKAGE_MANAGER_ARCHIVE_HXX
+#define BPKG_SYSTEM_PACKAGE_MANAGER_ARCHIVE_HXX
+
+#include <bpkg/types.hxx>
+#include <bpkg/utility.hxx>
+
+#include <bpkg/system-package-manager.hxx>
+
+namespace bpkg
+{
+ // The system package manager implementation for the installation archive
+ // packages, production only.
+ //
+ class system_package_manager_archive: public system_package_manager
+ {
+ public:
+ virtual paths
+ generate (const packages&,
+ const packages&,
+ const strings&,
+ const dir_path&,
+ const package_manifest&,
+ const string&,
+ const small_vector<language, 1>&,
+ optional<recursive_mode>) override;
+
+ virtual optional<const system_package_status*>
+ pkg_status (const package_name&, const available_packages*) override;
+
+ virtual void
+ pkg_install (const vector<package_name>&) override;
+
+ public:
+ // Note: options can only be NULL when testing functions that don't need
+ // them.
+ //
+ system_package_manager_archive (bpkg::os_release&&,
+ const target_triplet& host,
+ string arch,
+ optional<bool> progress,
+ const pkg_bindist_options*);
+
+ protected:
+ // Only for production.
+ //
+ const pkg_bindist_options* ops = nullptr;
+ target_triplet target;
+ };
+}
+
+#endif // BPKG_SYSTEM_PACKAGE_MANAGER_ARCHIVE_HXX