From f1d08308522bbcbc655f6e55b4b84af9253d8679 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 9 Feb 2023 09:00:55 +0200 Subject: Infrastructure work for binary distribution package generation --- bpkg/system-package-manager-fedora.hxx | 39 ++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) (limited to 'bpkg/system-package-manager-fedora.hxx') diff --git a/bpkg/system-package-manager-fedora.hxx b/bpkg/system-package-manager-fedora.hxx index 16fe9a3..52d2a3f 100644 --- a/bpkg/system-package-manager-fedora.hxx +++ b/bpkg/system-package-manager-fedora.hxx @@ -205,10 +205,42 @@ namespace bpkg virtual void pkg_install (const vector&) override; + virtual void + generate (packages&&, + packages&&, + strings&&, + const dir_path&, + optional) override; + public: - // Expects os_release::name_id to be "fedora" or os_release::like_ids to + // Expect os_release::name_id to be "fedora" or os_release::like_ids to // contain "fedora". - using system_package_manager::system_package_manager; + // + system_package_manager_fedora (bpkg::os_release&& osr, + const target_triplet& h, + string a, + optional progress, + bool install, + bool fetch, + bool yes, + string sudo) + : system_package_manager (move (osr), + h, + a.empty () ? arch_from_target (h) : move (a), + progress, + install, + fetch, + yes, + move (sudo)) {} + + system_package_manager_fedora (bpkg::os_release&& osr, + const target_triplet& h, + string a, + optional progress) + : system_package_manager (move (osr), + h, + a.empty () ? arch_from_target (h) : move (a), + progress) {} // Implementation details exposed for testing (see definitions for // documentation). @@ -240,6 +272,9 @@ namespace bpkg const string&, const vector>&); + static string + arch_from_target (const target_triplet&); + // If simulate is not NULL, then instead of executing the actual dnf // commands simulate their execution: (1) for `dnf list` and `dnf // repoquery --requires` by printing their command lines and reading the -- cgit v1.1