From d2b4cdf818b0e15f6018967f2991a7cb7f0bd178 Mon Sep 17 00:00:00 2001 From: Naresh Bannoth Date: Tue, 20 Aug 2024 14:08:09 +0530 Subject: [PATCH] Changing the kernel package name for sles distro kernel_src build Sles uses the different package name for kernel src. earlier we used kernel-default. But the package names are like kernel-source. Again fot build it uses kernel-default only but for install it uses kernel-source. So just changing it to kernel-source. Signed-off-by: Naresh Bannoth --- common/OpTestUtil.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/OpTestUtil.py b/common/OpTestUtil.py index 62157a5a..48e1e2ea 100644 --- a/common/OpTestUtil.py +++ b/common/OpTestUtil.py @@ -2316,7 +2316,10 @@ def get_distro_src(self, package, dest_path, build_option=None, pack_dir=None): elif self.distro_name() == 'sles': host.host_run_command("zypper install -y rpm-build") - s_cmd = f"zypper -n source-install {package};cd /usr/src/packages/SOURCES/;./mkspec;cp {package}.spec ../SPECS/" + if package.startswith("kernel"): + s_cmd = f"zypper -n source-install kernel-source;cd /usr/src/packages/SOURCES/;./mkspec;cp {package}.spec ../SPECS/" + else: + s_cmd = f"zypper -n source-install {package};cd /usr/src/packages/SOURCES/;./mkspec;cp {package}.spec ../SPECS/" if host.host_run_command(s_cmd): spec_path = f"/usr/src/packages/SPECS/{package}.spec"