From 1de9d5856e29762d236b56b9a36eb6f8477ce5f2 Mon Sep 17 00:00:00 2001 From: Paolo Pisati Date: Thu, 14 Apr 2016 09:26:10 +0000 Subject: [PATCH 2/2] plugins: kernel: don't expect modprobe to be in PATH Signed-off-by: Paolo Pisati --- snapcraft/plugins/kernel.py | 2 +- snapcraft/tests/test_plugin_kernel.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/snapcraft/plugins/kernel.py b/snapcraft/plugins/kernel.py index 27f2ef2..5e7f1ca 100644 --- a/snapcraft/plugins/kernel.py +++ b/snapcraft/plugins/kernel.py @@ -207,7 +207,7 @@ class KernelPlugin(kbuild.KBuildPlugin): if self.options.kernel_initrd_modules: modprobe_out = self.run_output([ - 'modprobe', '-n', '--show-depends', '-d', self.installdir, + '/sbin/modprobe', '-n', '--show-depends', '-d', self.installdir, '-S', self.kernel_release] + self.options.kernel_initrd_modules) modprobe_outs = modprobe_out.split(os.linesep) diff --git a/snapcraft/tests/test_plugin_kernel.py b/snapcraft/tests/test_plugin_kernel.py index c640200..be909e8 100644 --- a/snapcraft/tests/test_plugin_kernel.py +++ b/snapcraft/tests/test_plugin_kernel.py @@ -543,7 +543,7 @@ ACCEPT=n self.assertEqual(1, self.run_output_mock.call_count) self.run_output_mock.assert_has_calls([ mock.call([ - 'modprobe', '-n', '--show-depends', '-d', + '/sbin/modprobe', '-n', '--show-depends', '-d', plugin.installdir, '-S', '4.4.2', 'my-fake-module'])]) config_file = os.path.join(plugin.builddir, '.config') -- 2.7.4