Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use DNF for Fedora, newer Enterprise Linux #1835

Merged
merged 2 commits into from
Nov 23, 2023

Conversation

mhashizume
Copy link
Contributor

Prior to this commit, the install_package and uninstall_package methods used Yum for all versions of Red Hat Enterprise Linux. However, RHEL has used DNF as its default package manager since version 8.

This commit updates those methods to use DNF for RHEL 8, 9, and any future versions and to explicitly use Yum on RHEL versions 1-7.

Prior to this commit, the install_package and uninstall_package methods
used Yum for all versions of Red Hat Enterprise Linux. However, RHEL has
used DNF as its default package manager since version 8.

This commit updates those methods to use DNF for RHEL 8, 9, and any
future versions and to explicitly use Yum on RHEL versions 1-7.
Copy link

codecov bot commented Nov 22, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b637031) 74.58% compared to head (62bb5aa) 74.52%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1835      +/-   ##
==========================================
- Coverage   74.58%   74.52%   -0.07%     
==========================================
  Files          81       81              
  Lines        4506     4506              
==========================================
- Hits         3361     3358       -3     
- Misses       1145     1148       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -87,10 +87,10 @@ def install_package(name, cmdline_args = '', version = nil, opts = {})
execute("zypper --non-interactive --gpg-auto-import-keys in #{name}", opts)
when /el-4/
@logger.debug("Package installation not supported on rhel4")
when /amazon-2023|fedora-(2[2-9]|3[0-9])/
when /amazon-2023|el-(8|9|1[0-9])|fedora-(2[2-9]|3[0-9])/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fedora 40 is about to come out. Any thoughts on assuming DNF?

    when /cisco|eos|el-[1-7]-/
      # yum
    when /amazon|el|fedora/
      # dnf

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me. I guess at this point,we can assume any Fedora < 22 machines running are long gone.

I'll add another commit

@mhashizume mhashizume changed the title Use DNF for newer Enterprise Linux Use DNF for Fedora, newer Enterprise Linux Nov 22, 2023
Prior to this commit, the install and uninstall methods for Fedora
defaulted to using DNF as its package manager for versions greater than
or equal to 22 but less than 40, and Yum for every other version.

This commit configures Beaker to use DNF for every version of Fedora, as
DNF has been the default package manager for Fedora for the last 8
years.
@bastelfreak bastelfreak merged commit c70832d into voxpupuli:master Nov 23, 2023
7 of 8 checks passed
@mhashizume mhashizume deleted the rhel-dnf branch February 2, 2024 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants