summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHeiko <heiko.thole@entwicklung.eq-3.de>2024-04-15 07:34:22 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-04-25 13:39:17 +0100
commit7ef767d84d56b25498e45db83bb8f9d9caebeaf9 (patch)
tree55ab4fc540302732b7d373d6d93a1517cdb839ae
parentf0a26644b620dea3f8ca82714cfa3249b13b01b1 (diff)
downloadopenembedded-core-master.tar.gz
kernel.bbclass: check, if directory exists before removing empty module directoryHEADmaster
If the kernel folder does not exist, find will result in an error. This can occur if the kernel has no modules but, for example, custom modules are created. Add check before deleting. Signed-off-by: Heiko Thole <heiko.thole@entwicklung.eq-3.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes-recipe/kernel.bbclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes-recipe/kernel.bbclass b/meta/classes-recipe/kernel.bbclass
index b084d6d69d..c0a2056fec 100644
--- a/meta/classes-recipe/kernel.bbclass
+++ b/meta/classes-recipe/kernel.bbclass
@@ -463,7 +463,7 @@ kernel_do_install() {
rm -f "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/build"
rm -f "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/source"
# Remove empty module directories to prevent QA issues
- find "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel" -type d -empty -delete
+ [ -d "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel" ] && find "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel" -type d -empty -delete
else
bbnote "no modules to install"
fi