diff mbox series

rootfs.py: check depmodwrapper execution result

Message ID 20240109110515.7556-1-yang.xu@mediatek.com
State Accepted, archived
Commit 2f88e7d331390c6aaecc4522253e24791aec299e
Headers show
Series rootfs.py: check depmodwrapper execution result | expand

Commit Message

Yang Xu Jan. 9, 2024, 11:05 a.m. UTC
From: Yang Xu <yang.xu@mediatek.com>

The execution result of depmodwrapper is not checked which makes depmod
generation failed sliently and hard to detect.

So check exection result and stop building if depmodwrapper failed.

Signed-off-by: Yang Xu <yang.xu@mediatek.com>
---
 meta/lib/oe/rootfs.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
index 1a48ed10b3..3f27164536 100644
--- a/meta/lib/oe/rootfs.py
+++ b/meta/lib/oe/rootfs.py
@@ -349,7 +349,8 @@  class Rootfs(object, metaclass=ABCMeta):
             bb.utils.mkdirhier(versioned_modules_dir)
 
             bb.note("Running depmodwrapper for %s ..." % versioned_modules_dir)
-            self._exec_shell_cmd(['depmodwrapper', '-a', '-b', self.image_rootfs, kernel_ver, kernel_package_name])
+            if self._exec_shell_cmd(['depmodwrapper', '-a', '-b', self.image_rootfs, kernel_ver, kernel_package_name]):
+                bb.fatal("Kernel modules dependency generation failed")
 
     """
     Create devfs: