Skip to content

Commit

Permalink
Change Amazon Linux references to 2023
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mhashizume committed Nov 20, 2023
1 parent f973ee7 commit 857ef94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/beaker/host/unix/pkg.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 857ef94

Please sign in to comment.