From: Ovidiu Panait <[email protected]>

Currently, allyesconfig test runs for x86_64 fail with:
ERROR: linux-yocto-5.19.17+gitAUTOINC+0cba9aa404_aaf4490d18-r0 do_package:
QA Issue: linux-yocto: Files/directories were installed but not shipped in any
package:
  /lib/modules/5.19.17/kernel/drivers/nvdimm

With CONFIG_NVDIMM_TEST_BUILD=m, an empty nvdimm directory is created during
modules_install, which triggers the QA issue.

Extend kernel_do_install() to also remove inner empty directories that might
get created by modules_install.

Signed-off-by: Ovidiu Panait <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>

Backport from master
Signed-off-by: He Zhe <[email protected]>
---
 meta/classes/kernel.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 3e7264fb98..54b006550d 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -444,8 +444,8 @@ kernel_do_install() {
                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 the kernel/ directory is empty remove it to prevent QA 
issues
-               rmdir --ignore-fail-on-non-empty 
"${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel"
+               # Remove empty module directories to prevent QA issues
+               find 
"${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel" -type d -empty 
-delete
        else
                bbnote "no modules to install"
        fi
-- 
2.25.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#175008): 
https://lists.openembedded.org/g/openembedded-core/message/175008
Mute This Topic: https://lists.openembedded.org/mt/95882840/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to