]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.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)
committerSteve Sakoman <steve@sakoman.com>
Sat, 30 Sep 2023 17:44:17 +0000 (07:44 -1000)
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>
(cherry picked from commit 2e669bf797b15d803e7d6a700e449bdc467a4bcc)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/classes-recipe/kernel.bbclass

index 3abd689794afa3b37a4a93c0acd775d07975fcb6..31e4a683d1696b6047c68e270f225a1c8cfc183c 100644 (file)
@@ -445,8 +445,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