aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnubhav Shelat <ashelat@redhat.com>2023-06-30 13:10:17 -0400
committerJohn Kacur <jkacur@redhat.com>2023-06-30 13:43:04 -0400
commite6a2c2fdc43c3912c6c34c48f64fc2b62981d44d (patch)
treea6933b853de28ef9933d96ed03a22c40f28bcabe
parente0c70244c34b691cf62b504f39ce5aebe2ac1d34 (diff)
downloadrteval-e6a2c2fdc43c3912c6c34c48f64fc2b62981d44d.tar.gz
Fixed bug in kcompile where run would fail if kcompile-source version had the form x.y instead of x.y.z
Fixed bug in kcompile where run would fail if kcompile-source version had the form x.y instead of x.y.z Signed-off-by: Anubhav Shelat <ashelat@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
-rw-r--r--rteval/modules/loads/kcompile.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/rteval/modules/loads/kcompile.py b/rteval/modules/loads/kcompile.py
index 35ee5cb..9244246 100644
--- a/rteval/modules/loads/kcompile.py
+++ b/rteval/modules/loads/kcompile.py
@@ -175,7 +175,7 @@ class Kcompile(CommandLineLoad):
if 'rc' in self._cfg.source:
tarfile_prefix = re.search(r"\d{1,2}\.\d{1,3}\-[a-z]*\d{1,2}", self._cfg.source).group(0)
else:
- tarfile_prefix = re.search(r"\d{1,2}\.\d{1,3}\.*\d{1,2}", self._cfg.source).group(0)
+ tarfile_prefix = re.search(r"(\d{1,2}\.\d{1,3}\.\d{1,3})|(\d{1,2}\.\d{1,3})", self._cfg.source).group(0)
# either a tar.xz or tar.gz might exist. Check for both.
xz_file = os.path.join(self.srcdir,"linux-" + tarfile_prefix + ".tar.xz" )
@@ -193,7 +193,7 @@ class Kcompile(CommandLineLoad):
# find our source tarball
if self._cfg.source:
self.source = self._find_tarball()
- kernel_prefix = re.search(r"linux-\d{1,2}\.\d{1,3}\.*\d{1,2}", self.source).group(0)
+ kernel_prefix = re.search(r"(linux-\d{1,2}\.\d{1,3}\.\d{1,3})|(linux-\d{1,2}\.\d{1,3})", self.source).group(0)
else:
tarfiles = glob.glob(os.path.join(self.srcdir, f"{DEFAULT_KERNEL_PREFIX}*"))
if tarfiles: