diff mbox series

[2/7] UBUNTU: SAUCE: ubuntu_ltp: Install the linux-modules-extra package matching the running kernel

Message ID 20211104130146.1537314-3-francis.ginther@canonical.com
State New
Headers show
Series Install the linux-modules-extra package matching the running kernel | expand

Commit Message

Francis Ginther Nov. 4, 2021, 1:01 p.m. UTC
Install the linux-modules-extra package matching the running kernel
instead of doing a wildcard match on the kernel flavour. The wildcard
may match packages that are uninstallable.

Signed-off-by: Francis Ginther <francis.ginther@canonical.com>
---
 ubuntu_ltp/ubuntu_ltp.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/ubuntu_ltp/ubuntu_ltp.py b/ubuntu_ltp/ubuntu_ltp.py
index 78137809..1fc1bba4 100644
--- a/ubuntu_ltp/ubuntu_ltp.py
+++ b/ubuntu_ltp/ubuntu_ltp.py
@@ -36,6 +36,7 @@  class ubuntu_ltp(test.test):
             'libselinux1-dev',
             'libssl-dev',
             'libtirpc-dev',
+            'linux-modules-extra-' + platform.uname()[2],
             'pkg-config',
             'quota',
             'xfslibs-dev',
@@ -44,9 +45,6 @@  class ubuntu_ltp(test.test):
         gcc = 'gcc' if self.arch in ['ppc64le', 'aarch64', 's390x', 'riscv64'] else 'gcc-multilib'
         pkgs.append(gcc)
 
-        if self.flavour in ['aws', 'azure', 'azure-fips', 'gcp', 'gcp-fips', 'gke', 'gkeop']:
-             pkgs.append('linux-modules-extra-' + self.flavour + '*')
-
         cmd = 'yes "" | DEBIAN_FRONTEND=noninteractive apt-get install --yes --force-yes ' + ' '.join(pkgs)
         self.results = utils.system_output(cmd, retain_output=True)