diff mbox series

[meta-oe,68/72] rasdaemon: Do not leave an empty /usr/lib without usrmerge

Message ID 20261130084643.1500716-69-khem.raj@oss.qualcomm.com
State New
Headers show
Series Upgrades, tip updates, removals and build fixes | expand

Commit Message

Khem Raj Nov. 30, 2026, 8:46 a.m. UTC
Without usrmerge the recipe moves the systemd units from
/usr/lib/systemd/system to /lib/systemd/system, but the now empty
/usr/lib stays behind:

  ERROR: rasdaemon-1.0.1-r0 do_package: QA Issue: rasdaemon: Files/directories were installed but not shipped in any package:
    /usr/lib

Remove it when it is empty. Since 1.0.1 meson installs the units into
${prefix}/lib/systemd/system whatever ${libdir} is, so move them from
there; the ${libdir} path broke multilib (/usr/lib64). Only move them
when meson did not find systemd.pc and the directory exists.

AI-Generated: Uses Claude Code
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
---
 .../recipes-support/rasdaemon/rasdaemon_1.0.1.bb           | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/meta-oe/dynamic-layers/meta-python/recipes-support/rasdaemon/rasdaemon_1.0.1.bb b/meta-oe/dynamic-layers/meta-python/recipes-support/rasdaemon/rasdaemon_1.0.1.bb
index 332ffc998a..6ccefed792 100644
--- a/meta-oe/dynamic-layers/meta-python/recipes-support/rasdaemon/rasdaemon_1.0.1.bb
+++ b/meta-oe/dynamic-layers/meta-python/recipes-support/rasdaemon/rasdaemon_1.0.1.bb
@@ -49,10 +49,11 @@  PACKAGECONFIG[nvidia-ns-decode] = "-Dnvidia-ns-decode=enabled,-Dnvidia-ns-decode
 PACKAGECONFIG[yitian-ns-decode] = "-Dyitian-ns-decode=enabled,-Dyitian-ns-decode=disabled"
 
 do_install:append() {
-	if [ "${libdir}/systemd/system" != "${systemd_system_unitdir}" ]; then
+	if [ -d ${D}${prefix}/lib/systemd/system ] && [ "${prefix}/lib/systemd/system" != "${systemd_system_unitdir}" ]; then
 		install -d ${D}${systemd_system_unitdir}
-		mv ${D}${libdir}/systemd/system/* ${D}${systemd_system_unitdir}/
-		rm -rf ${D}${libdir}/systemd
+		mv ${D}${prefix}/lib/systemd/system/* ${D}${systemd_system_unitdir}/
+		rm -rf ${D}${prefix}/lib/systemd
+		rmdir --ignore-fail-on-non-empty ${D}${prefix}/lib
 	fi
 	install -d ${D}${sysconfdir}/init.d
 	install -m 755 ${UNPACKDIR}/init ${D}${sysconfdir}/init.d/rasdaemon