[OE-core] [PATCH 7/7] systemd: do not pre-enable services, rely on presets

Alexander Kanavin alex.kanavin at gmail.com
Wed Jan 2 12:06:55 UTC 2019


On Mon, 31 Dec 2018 at 13:07, Jonas Bonn <jonas at norrbonn.se> wrote:
> diff --git a/meta/recipes-core/systemd/systemd_239.bb b/meta/recipes-core/systemd/systemd_239.bb
> index 70e687c92e..7b4c5c56aa 100644
> --- a/meta/recipes-core/systemd/systemd_239.bb
> +++ b/meta/recipes-core/systemd/systemd_239.bb
> @@ -298,6 +298,8 @@ do_install() {
>         # duplicate udevadm for postinst script
>         install -d ${D}${libexecdir}
>         ln ${D}${base_bindir}/udevadm ${D}${libexecdir}/${MLPREFIX}udevadm
> +
> +       rm -rf ${D}${sysconfdir}/systemd/system
>  }

Apologies, but this is a hack. You need to tell systemd to not install
the files in the first place, if they are unneeded, instead of
removing them after the fact, which is a maintainability issue
(specifically, anyone looking at the recipe would be totally puzzled
by this removal).

If systemd always installs the files, you should add a configure
option, and send the patch upstream *first*.

Alex


More information about the Openembedded-core mailing list