On 8/31/2023 8:47 AM, Frédéric Martinsons wrote:
Hello,
On Thu, 31 Aug 2023 at 15:38, Ryan Eatmon via lists.openembedded.org
<http://lists.openembedded.org> <[email protected]
<mailto:[email protected]>> wrote:
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 an
exists check around the call.
Signed-off-by: Ryan Eatmon <[email protected] <mailto:[email protected]>>
---
meta/classes-recipe/kernel.bbclass | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/meta/classes-recipe/kernel.bbclass
b/meta/classes-recipe/kernel.bbclass
index acb43bd4d5..4df052061b 100644
--- a/meta/classes-recipe/kernel.bbclass
+++ b/meta/classes-recipe/kernel.bbclass
@@ -454,8 +454,12 @@ 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"
+ if [ -e
"${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/build" ]; then
+ rm
"${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/build"
+ fi
+ if [ -e
"${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/source" ]; then
+ rm
"${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/source"
+ fi
# Remove empty module directories to prevent QA issues
find
"${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel" -type
d -empty -delete
else
--
2.17.1
My 2 cents: the "-f" switch makes rm ignore nonexistent files , and it
will make a shorter patch ;)
If that is the group consensus I can submit a v2. Anyone else feel that
way?
--
Ryan Eatmon [email protected]
-----------------------------------------
Texas Instruments, Inc. - LCPD - MGTS
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186976):
https://lists.openembedded.org/g/openembedded-core/message/186976
Mute This Topic: https://lists.openembedded.org/mt/101073782/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-