diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2017-12-20 09:53:13 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-01-04 12:56:04 +0000 |
commit | 9daf88713dedfb29fe926e18d76090a6b2582ac8 (patch) | |
tree | 0e67069d1a7c4e1ee7fe111a9f90411137e1b320 /meta/recipes-core/systemd | |
parent | 658c59c90092f15c026fa3c72399f481c7241f65 (diff) | |
download | openembedded-core-contrib-9daf88713dedfb29fe926e18d76090a6b2582ac8.tar.gz |
systemd: inherit distro_features_check
Use distro_features_check so that we can have a uniform controller.
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/systemd')
-rw-r--r-- | meta/recipes-core/systemd/systemd-serialgetty.bb | 10 | ||||
-rw-r--r-- | meta/recipes-core/systemd/systemd_234.bb | 13 |
2 files changed, 9 insertions, 14 deletions
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" diff --git a/meta/recipes-core/systemd/systemd_234.bb b/meta/recipes-core/systemd/systemd_234.bb index 9a10a31881..4132cdf40f 100644 --- a/meta/recipes-core/systemd/systemd_234.bb +++ b/meta/recipes-core/systemd/systemd_234.bb @@ -8,7 +8,11 @@ DEPENDS = "kmod intltool-native gperf-native acl readline libcap libcgroup util- SECTION = "base/shell" -inherit useradd pkgconfig autotools perlnative update-rc.d update-alternatives qemu systemd ptest gettext bash-completion manpages +inherit useradd pkgconfig autotools perlnative update-rc.d update-alternatives qemu systemd ptest gettext bash-completion manpages distro_features_check + +# As this recipe builds udev, respect systemd being in DISTRO_FEATURES so +# that we don't build both udev and systemd in world builds. +REQUIRED_DISTRO_FEATURES = "systemd" SRC_URI = "git://github.com/systemd/systemd.git;protocol=git \ file://touchscreen.rules \ @@ -630,10 +634,3 @@ pkg_postinst_udev-hwdb () { pkg_prerm_udev-hwdb () { rm -f $D${sysconfdir}/udev/hwdb.bin } - -# As this recipe builds udev, respect systemd being in DISTRO_FEATURES so -# that we don't build both udev and systemd in world builds. -python () { - if not bb.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d): - raise bb.parse.SkipPackage("'systemd' not in DISTRO_FEATURES") -} |