Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swupdate: Enable systemd based on distro feature #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion recipes-support/swupdate/swupdate.inc
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ python () {
if 'CONFIG_JSON=y\n' in features:
depends += ' json-c'

if 'CONFIG_SYSTEMD=y\n' in features:
if 'CONFIG_SYSTEMD=y\n' in features or bb.utils.contains('DISTRO_FEATURES', 'systemd', True, False ,d):
depends += ' systemd'

if 'CONFIG_ARCHIVE=y\n' in features:
Expand Down Expand Up @@ -244,6 +244,14 @@ python () {
d.setVar('SWUPDATE_SW_VERSIONS_FILE', swver_file)
}

# in case systemd is set as a distro feature this will add it to the defconfig
update_config_systemd(){
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
sed -i -e 's/# CONFIG_SYSTEMD is not set/CONFIG_SYSTEMD=y/g' ${WORKDIR}/defconfig;
fi
}
do_configure[prefuncs] += "update_config_systemd"

do_configure () {
cat > ${WORKDIR}/.config <<HEREDOC
CONFIG_EXTRA_CFLAGS="${CFLAGS}"
Expand Down