From 857ef9497214bb5977d1d695e271b7c867d1c7fb Mon Sep 17 00:00:00 2001 From: Michael Hashizume Date: Mon, 20 Nov 2023 10:22:40 -0800 Subject: [PATCH] Change Amazon Linux references to 2023 Prior to this, Beaker used DNF for every type of Amazon Linux. However, DNF is only the default package manager for Amazon Linux >= 2023. This commit updates instances of Amazon Linux in the install_package and uninstall_package methods to reference Amazon Linux 2023 specifically. --- lib/beaker/host/unix/pkg.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/beaker/host/unix/pkg.rb b/lib/beaker/host/unix/pkg.rb index 459538b67..b6fadb6d2 100644 --- a/lib/beaker/host/unix/pkg.rb +++ b/lib/beaker/host/unix/pkg.rb @@ -96,7 +96,7 @@ def install_package(name, cmdline_args = '', version = nil, opts = {}) name = "#{name}-#{version}" end execute("dnf -y #{cmdline_args} install #{name}", opts) - when /amazon|cisco|fedora|centos|redhat|eos|el-/ + when /amazon-2023|cisco|fedora|centos|redhat|eos|el-/ if version name = "#{name}-#{version}" end @@ -183,7 +183,7 @@ def uninstall_package(name, cmdline_args = '', opts = {}) execute("zypper --non-interactive rm #{name}", opts) when /el-4/ @logger.debug("Package uninstallation not supported on rhel4") - when /amazon|fedora-(2[2-9]|3[0-9])/ + when /amazon-2023|fedora-(2[2-9]|3[0-9])/ execute("dnf -y #{cmdline_args} remove #{name}", opts) when /cisco|fedora|centos|redhat|eos|el-/ execute("yum -y #{cmdline_args} remove #{name}", opts)