diff options
Diffstat (limited to 'bpkg/system-package-manager.cxx')
-rw-r--r-- | bpkg/system-package-manager.cxx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/bpkg/system-package-manager.cxx b/bpkg/system-package-manager.cxx index 5089db1..6a44b09 100644 --- a/bpkg/system-package-manager.cxx +++ b/bpkg/system-package-manager.cxx @@ -14,6 +14,7 @@ #include <bpkg/diagnostics.hxx> #include <bpkg/system-package-manager-debian.hxx> +#include <bpkg/system-package-manager-fedora.hxx> using namespace std; using namespace butl; @@ -71,6 +72,25 @@ namespace bpkg r.reset (new system_package_manager_debian ( move (*osr), host, install, fetch, progress, yes, sudo)); } + else if (is_or_like ("fedora") || + is_or_like ("rhel") || + is_or_like ("centos") || + is_or_like ("rocky") || + is_or_like ("almalinux")) + { + if (!name.empty () && name != "fedora") + fail << "unsupported package manager '" << name << "' for " + << osr->name_id << " host"; + + // If we recognized this as Fedora-like in an ad hoc manner, then + // add fedora to like_ids. + // + if (osr->name_id != "fedora" && !is_or_like ("fedora")) + osr->like_ids.push_back ("fedora"); + + r.reset (new system_package_manager_fedora ( + move (*osr), host, install, fetch, progress, yes, sudo)); + } } } |