From: Yoann Congal <[email protected]>

Polkit unconditionally installs a systemd service, remove it in
do_install() on SysVinit systems to avoid "installed but not packaged
file" error.

Fixes this error:
ERROR: polkit-125-r0 do_package: QA Issue: polkit: Files/directories were 
installed but not shipped in any package:
  /usr/lib/systemd
  /usr/lib/systemd/system
  /usr/lib/systemd/system/polkit.service
Please set FILES such that these items are packaged. Alternatively if they are 
unneeded, avoid installing them or delete them within do_install.
polkit: 3 installed and not shipped files. [installed-vs-shipped]
ERROR: polkit-125-r0 do_package: Fatal QA errors were found, failing task.

Signed-off-by: Yoann Congal <[email protected]>
---
v1->v2: no change
---
 meta-oe/recipes-extended/polkit/polkit_125.bb | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/meta-oe/recipes-extended/polkit/polkit_125.bb 
b/meta-oe/recipes-extended/polkit/polkit_125.bb
index 54a2b3636f..348722a561 100644
--- a/meta-oe/recipes-extended/polkit/polkit_125.bb
+++ b/meta-oe/recipes-extended/polkit/polkit_125.bb
@@ -53,6 +53,12 @@ do_install:append() {
                chmod 700 ${D}/${sysconfdir}/polkit-1/rules.d
                chown polkitd:root ${D}/${sysconfdir}/polkit-1/rules.d
        fi
+
+       # Polkit unconditionally installs a systemd service, remove it on 
SysVinit
+       # systems to avoid "installed but not packaged file" error.
+       if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', 
d)}; then
+               rm -r ${D}${libdir}/systemd
+       fi
 }
 
 FILES:${PN} += " \
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#112098): 
https://lists.openembedded.org/g/openembedded-devel/message/112098
Mute This Topic: https://lists.openembedded.org/mt/108281788/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to