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

Fixed the different python3-devel package names in RHEL8 and RHEL9 #2873

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions io/net/infiniband/mofed_install_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,14 @@ def setUp(self):
# on Avocado versions >= 50.0. This is a temporary compatibility
# enabler for older runners, but should be removed soon
elif detected_distro.name in ['rhel', 'fedora', 'redhat']:
pkgs.extend(["make", "gcc", "python36-devel", "tcsh",
"kernel-rpm-macros", "gdb-headless", "rpm-build",
"gcc-gfortran", kernel_ver])
if detected_distro.version == "9":
pkgs.extend(["make", "gcc", "python3-devel", "tcsh",
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of duplicating all package names you can restrict the if else only for python3/python36 package

        pkgs.extend(["make", "gcc", "tcsh",
                     "kernel-rpm-macros", "gdb-headless", "rpm-build",
                     "gcc-gfortran", kernel_ver])
        if detected_distro.version == "9":
            pkgs.extend(["python3-devel"])
        elif detected_distro.version == "8":
            pkgs.extend(["python36-devel"])

"kernel-rpm-macros", "gdb-headless", "rpm-build",
"gcc-gfortran", kernel_ver])
elif detected_distro.version == "8":
pkgs.extend(["make", "gcc", "python36-devel", "tcsh",
"kernel-rpm-macros", "gdb-headless", "rpm-build",
"gcc-gfortran", kernel_ver])
for pkg in pkgs:
if not smm.check_installed(pkg) and not smm.install(pkg):
self.cancel("Not able to install %s" % pkg)
Expand Down
Loading