From 7b9d9ff35c2bdc5601fa9bb2249fe8104a29ed1d Mon Sep 17 00:00:00 2001 From: Pavaman Subramaniyam Date: Tue, 20 Aug 2024 04:05:44 -0400 Subject: [PATCH] Fixed the different python3-devel package names in RHEL8 and RHEL9 So handling the different package names available to be installed accordingly Signed-off-by: Pavaman Subramaniyam --- io/net/infiniband/mofed_install_test.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/io/net/infiniband/mofed_install_test.py b/io/net/infiniband/mofed_install_test.py index 3169474e4..f15b4cdae 100755 --- a/io/net/infiniband/mofed_install_test.py +++ b/io/net/infiniband/mofed_install_test.py @@ -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", + "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)