Bug 15292

Summary: systemd-compat-units: error at package post-install time
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Michael Opdenacker <michael.opdenacker>
Component: coreAssignee: Michael Opdenacker <michael.opdenacker>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: meta.mr.watcher, meta.watcher, randy.macleod
Version: 5.0   
Target Milestone: 5.0 M1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Michael Opdenacker 2023-11-22 10:15:58 UTC
On a system built without systemd, I'm getting this error after running
"opkg upgrade" (for example between yocto 4.2.2 and 4.2.3):

Configuring systemd-compat-units
//var/lib/opkg/info/systemd-compat-units.postinst: cd: line 3: can't cd to /etc/init.d: No such file or directory

This happens because of the way the existence of /etc/init.d/ is tested. If the directory doesn't exist, the "cd" command issues an error.
Comment 1 Michael Opdenacker 2023-11-22 10:25:12 UTC
Proposed a fix:
https://lists.openembedded.org/g/openembedded-core/message/191055