diff --git a/recipes-support/swupdate/swupdate.inc b/recipes-support/swupdate/swupdate.inc index 188c25c6..52517bb8 100644 --- a/recipes-support/swupdate/swupdate.inc +++ b/recipes-support/swupdate/swupdate.inc @@ -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: @@ -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 <