]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
kernel.bbclass: Add force flag to rm calls
authorRyan Eatmon <reatmon@ti.com>
Thu, 31 Aug 2023 19:26:29 +0000 (14:26 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 2 Sep 2023 10:47:39 +0000 (11:47 +0100)
The latest 6.5 kernels do not appear to create the source file in
${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/source so the
recipe errors out when trying to remove it.  Simple fix is to add the
-f (force) flag to the call.

Signed-off-by: Ryan Eatmon <reatmon@ti.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-recipe/kernel.bbclass

index acb43bd4d574e29daae89346e20877df75cbbe5d..2ec9ea2091e8dcd6b8a388fdce80d36eb2d38303 100644 (file)
@@ -454,8 +454,8 @@ kernel_do_install() {
        unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
        if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
                oe_runmake DEPMOD=echo MODLIB=${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION} INSTALL_FW_PATH=${D}${nonarch_base_libdir}/firmware modules_install
-               rm "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/build"
-               rm "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/source"
+               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
        else