Bug 4309

Summary: Unpackaged file warnings for systemd units when systemd disabled
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Paul Eggleton <bluelightning>
Component: coreAssignee: Radu Moisan <radu.moisan>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: Medium CC: Martin.Jansa, meta.mr.watcher, meta.watcher
Version: 1.5   
Target Milestone: 1.5   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Paul Eggleton 2013-04-16 10:49:18 UTC
If a recipe inherits systemd, installs a systemd unit into ${systemd_unitdir} and doesn't explicitly mention it in FILES and you aren't using systemd (i.e. you don't have systemd in DISTRO_FEATURES) you'll get an unpackaged file warning during do_package, because the code in systemd.bbclass that normally adds ${systemd_unitdir} to FILES is explicitly not called. This issue can be seen in various recipes in meta-networking e.g. ypbind-mt.

I suspect these unit files ought to just be deleted at the end of do_install by systemd.bbclass if systemd is not in DISTRO_FEATURES.
Comment 1 Martin Jansa 2013-04-17 09:19:35 UTC
This seems like better solution
http://lists.linuxtogo.org/pipermail/openembedded-core/2013-February/036169.html

Remove duplicated do_installs and install systemd files by shared chunk of code in systemd.bbclass (like it was in meta-systemd) only when systemd is in DISTRO_FEATURES and remove them if they are installed by upstream and systemd isn't in DISTRO_FEATURES