[OE-core] why would systemd-systemctl-native need underlying sysvinit?

Alex Kiernan alex.kiernan at gmail.com
Mon Feb 24 19:14:15 UTC 2020


On Mon, Feb 24, 2020 at 7:06 PM Robert P. J. Day <rpjday at crashcourse.ca> wrote:
>
>
>   in midst of migrating old YP layer to newer one and running across
> all sorts of oddities. in this case, in current master branch of
> oe-core, we have:
>
> recipes-bsp/keymaps/keymaps_1.0.bb:PACKAGE_WRITE_DEPS_append = "
> ${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','systemd-systemctl-native','',d)}"
>

commit ee3ac7c64ed4c96062e7d21eed1355d4b60b78c4
Author: Jonas Bonn <jonas at norrbonn.se>
Date:   Tue Jan 29 08:24:42 2019 +0100

    keymaps: tighten package write dependency

    The dependency on systemd-systemctl-native is only needed if _both_
    systemd and sysvinit are in play.

    (From OE-Core rev: 3ea08f4b24f8a49c3d5039b62b39d6419cfe234c)

    Signed-off-by: Jonas Bonn <jonas at norrbonn.se>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

which is then obvious once you read the source:

pkg_postinst_${PN} () {
        if ${@bb.utils.contains('DISTRO_FEATURES','systemd
sysvinit','true','false',d)}; then
                if [ -n "$D" ]; then
                        OPTS="--root=$D"
                fi
                systemctl $OPTS mask keymap.service
        fi
}

And then the commit which added that makes it even clearer:

commit c57427b4a7991e33b806d4fd0956b6010ed52f62
Author: Chen Qi <Qi.Chen at windriver.com>
Date:   Wed Sep 3 15:09:17 2014 +0800

    keymaps: mask keymap when necessary

    When 'sysvinit' and 'systemd' are both in DISTRO_FEATURES, we need
    to prevent the init script from running via systemd.
    This is because that the functionality of the init script has implemented
    in systemd internally.

    (From OE-Core rev: 8cfba07e24dae3d1837ccb5cb04e11f362519b0a)

    Signed-off-by: Chen Qi <Qi.Chen at windriver.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>


I'd guess the others are similar.

-- 
Alex Kiernan


More information about the Openembedded-core mailing list