From effbd3d25e0509d870f5a658dd24c93c27924cba Mon Sep 17 00:00:00 2001 From: Robert Yang Date: Tue, 19 Dec 2017 16:23:40 +0800 Subject: systemd: inherit distro_features_check Use distro_features_check so that we can have a uniform controller. Signed-off-by: Robert Yang --- meta/recipes-core/systemd/systemd-serialgetty.bb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'meta/recipes-core/systemd/systemd-serialgetty.bb') diff --git a/meta/recipes-core/systemd/systemd-serialgetty.bb b/meta/recipes-core/systemd/systemd-serialgetty.bb index d9347163b5..d67a3c91b4 100644 --- a/meta/recipes-core/systemd/systemd-serialgetty.bb +++ b/meta/recipes-core/systemd/systemd-serialgetty.bb @@ -11,6 +11,10 @@ SRC_URI = "file://serial-getty@.service" S = "${WORKDIR}" +# As this package is tied to systemd, only build it when we're also building systemd. +inherit distro_features_check +REQUIRED_DISTRO_FEATURES = "systemd" + do_install() { if [ ! -z "${SERIAL_CONSOLES}" ] ; then default_baudrate=`echo "${SERIAL_CONSOLES}" | sed 's/\;.*//'` @@ -43,10 +47,4 @@ do_install() { FILES_${PN} = "${systemd_unitdir}/system/*.service ${sysconfdir}" PACKAGE_ARCH = "${MACHINE_ARCH}" -# As this package is tied to systemd, only build it when we're also building systemd. -python () { - if not bb.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d): - raise bb.parse.SkipPackage("'systemd' not in DISTRO_FEATURES") -} - ALLOW_EMPTY_${PN} = "1" -- cgit 1.2.3-korg