summaryrefslogtreecommitdiffstats
path: root/meta/classes/kernel.bbclass
diff options
context:
space:
mode:
authorHeiko <heiko.thole@entwicklung.eq-3.de>2024-04-15 07:34:22 +0200
committerSteve Sakoman <steve@sakoman.com>2024-05-15 09:44:16 -0700
commit6024b7be0154829a830ce6109ad13e607175d7eb (patch)
treedf5419568064070c8465eb595c9c1bc9349e32a4 /meta/classes/kernel.bbclass
parent59d099b69040aa7ed1b94649128a0c629107db65 (diff)
downloadpoky-6024b7be0154829a830ce6109ad13e607175d7eb.tar.gz
kernel.bbclass: check, if directory exists before removing empty module directory
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. (From OE-Core rev: 4e4681b26e0d88ad219d72b75e598e6b81b430fc) 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> (cherry picked from commit 7ef767d84d56b25498e45db83bb8f9d9caebeaf9) Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta/classes/kernel.bbclass')
-rw-r--r--meta/classes/kernel.bbclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index dbd89057f3..988a489396 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -452,7 +452,7 @@ kernel_do_install() {
452 rm -f "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/build" 452 rm -f "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/build"
453 rm -f "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/source" 453 rm -f "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/source"
454 # Remove empty module directories to prevent QA issues 454 # Remove empty module directories to prevent QA issues
455 find "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel" -type d -empty -delete 455 [ -d "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel" ] && find "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel" -type d -empty -delete
456 else 456 else
457 bbnote "no modules to install" 457 bbnote "no modules to install"
458 fi 458 fi