Bug 13685 - image.bblcass systemd_preset_all preprocess command fails
Summary: image.bblcass systemd_preset_all preprocess command fails
Status: CLOSED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: configuration (show other bugs)
Version: 3.0.1
Hardware: All Multiple
: Medium critical
Target Milestone: 3.0.2
Assignee: Slavic Brutalik
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2019-12-05 21:16 UTC by Slavic Brutalik
Modified: 2020-02-03 16:35 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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