Skip to content

Commit 2b4912f

Browse files
Merge pull request #860 from Naresh-ibm/sles_src_build
Changing the kernel package name for sles distro kernel_src build
2 parents ad0dcd8 + d2b4cdf commit 2b4912f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

common/OpTestUtil.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -2316,7 +2316,10 @@ def get_distro_src(self, package, dest_path, build_option=None, pack_dir=None):
23162316

23172317
elif self.distro_name() == 'sles':
23182318
host.host_run_command("zypper install -y rpm-build")
2319-
s_cmd = f"zypper -n source-install {package};cd /usr/src/packages/SOURCES/;./mkspec;cp {package}.spec ../SPECS/"
2319+
if package.startswith("kernel"):
2320+
s_cmd = f"zypper -n source-install kernel-source;cd /usr/src/packages/SOURCES/;./mkspec;cp {package}.spec ../SPECS/"
2321+
else:
2322+
s_cmd = f"zypper -n source-install {package};cd /usr/src/packages/SOURCES/;./mkspec;cp {package}.spec ../SPECS/"
23202323
if host.host_run_command(s_cmd):
23212324

23222325
spec_path = f"/usr/src/packages/SPECS/{package}.spec"

0 commit comments

Comments
 (0)