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>
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/\;.*//'`
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"
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 \
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")
-}
SRC_URI[md5sum] = "41e19b70462692fefd072a3f38818b6e"
SRC_URI[sha256sum] = "3e4c56ec2fc1854afd0a31f3affa48f922c62d40ee12a0c1a4b4f152ef5b0f63"
-inherit autotools update-rc.d qemu pkgconfig
+inherit autotools update-rc.d qemu pkgconfig distro_features_check
+
+CONFLICT_DISTRO_FEATURES = "systemd"
EXTRA_OECONF = " \
--sbindir=${base_sbindir} \
RPROVIDES_${PN} = "hotplug udev"
RPROVIDES_eudev-hwdb += "udev-hwdb"
-python () {
- if bb.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d):
- raise bb.parse.SkipPackage("'systemd' in DISTRO_FEATURES")
-}
-
PACKAGE_WRITE_DEPS += "qemu-native"
pkg_postinst_eudev-hwdb () {
if test -n "$D"; then