Bug 3816

Summary: systemd: investigate mechanism to change default.target
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Radu Moisan <radu.moisan>
Component: coreAssignee: Chen Qi <Qi.Chen>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: meta.mr.watcher, meta.watcher, richard.purdie, ross.burton, song.liu, sstncr
Version: 1.4   
Target Milestone: 1.6   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Yes (doc changes required)
Bug Depends on:    
Bug Blocks: 5441    

Description Radu Moisan 2013-01-31 09:37:35 UTC
we need to find a way to set default.target to multi-user or graphical so that it is appropriately set for particular image type (eg. minimal vs sato)
Comment 1 Radu Moisan 2013-04-02 13:50:31 UTC
Proposed solution from Martin:

systemd:
inherit update-alternatives
ALTERNATIVE_${PN} = "systemd-def-target"
ALTERNATIVE_TARGET[systemd-def-target] = "${systemd_unitdir}/system/multi-user.target"
ALTERNATIVE_LINK_NAME[systemd-def-target] = "${systemd_unitdir}/systemd/system/default.target"
ALTERNATIVE_PRIORITY[systemd-def-target] ?= "1"

xserver-nodm-init and DMs:
inherit update-alternatives
ALTERNATIVE_${PN} = "systemd-def-target"
ALTERNATIVE_TARGET[systemd-def-target] = "${systemd_unitdir}/system/graphical.target"
ALTERNATIVE_LINK_NAME[systemd-def-target] = "${systemd_unitdir}/systemd/system/default.target"
ALTERNATIVE_PRIORITY[systemd-def-target] ?= "10"

Sent patch, waiting for review.
Comment 2 Radu Moisan 2013-04-02 13:51:46 UTC
correction, extra systemd in path

systemd:
inherit update-alternatives
ALTERNATIVE_${PN} = "systemd-def-target"
ALTERNATIVE_TARGET[systemd-def-target] = "${systemd_unitdir}/system/multi-user.target"
ALTERNATIVE_LINK_NAME[systemd-def-target] = "${systemd_unitdir}/system/default.target"
ALTERNATIVE_PRIORITY[systemd-def-target] ?= "1"

xserver-nodm-init and DMs:
inherit update-alternatives
ALTERNATIVE_${PN} = "systemd-def-target"
ALTERNATIVE_TARGET[systemd-def-target] = "${systemd_unitdir}/system/graphical.target"
ALTERNATIVE_LINK_NAME[systemd-def-target] = "${systemd_unitdir}/system/default.target"
ALTERNATIVE_PRIORITY[systemd-def-target] ?= "10"
Comment 3 Radu Moisan 2013-04-09 15:17:50 UTC
we'll have this on hold until we move along with systemd enablement in xserver-nodm-init. We must update xserver-nodm-init as well so we remain consistent among various image targets.
Comment 4 Chen Qi 2014-01-14 06:52:14 UTC
Module: openembedded-core.git
Branch: master
Commit: 049f89155b1e80875aad6e53b21808b827c06915
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=049f89155b1e80875aad6e53b21808b827c06915

//Chen Qi
Comment 5 Stefan Stanacar 2014-03-10 13:06:28 UTC
Verified in 003d3170edaa9472ee46111caa901ac7ddf9321c