Bug 13685

Summary: image.bblcass systemd_preset_all preprocess command fails
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Slavic Brutalik <sky.captin>
Component: configurationAssignee: Slavic Brutalik <sky.captin>
Status: CLOSED FIXED QA Contact:
Severity: critical    
Priority: Medium CC: akuster808, akuster
Version: 3.0.1   
Target Milestone: 3.0.2   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Slavic Brutalik 2019-12-05 21:16:21 UTC
zeus contains a new IMAGE_PREPROCESS_COMMAND called systemd_preset_all which uses recipes-core/systemd/systemd-systemctl/sytemctl to scan for units to symlink in /etc/systemd/system

That code uses path.exists() to test for units instead of path.isFile because in . This causes preset_all to fail because rootfs-postcommands.bbclass calls set_systemd_default_target that creates a symlink. path.exists() fails with symlinks of the file being linked is not currently available. (which it will not be when constructing rootfs)

This is a critical issue. 

W
Comment 1 Slavic Brutalik 2019-12-06 15:25:45 UTC
isfile does not work.

that line needs to change to:

if path.exists() or os.path.islink(path):
Comment 2 Armin Kuster 2019-12-12 15:33:40 UTC
Can you send a patch.
Comment 3 Slavic Brutalik 2019-12-12 15:35:09 UTC
Will do.
Comment 4 Slavic Brutalik 2019-12-13 18:17:57 UTC
(In reply to comment #2)
> Can you send a patch.

Sent.
Comment 6 akuster 2020-02-03 16:35:22 UTC
closing