[OE-core] [PATCH 10/13] update-rc.d.bbclass: support VIRTUAL-RUNTIME_init_manager == busybox

Khem Raj raj.khem at gmail.com
Sat Aug 24 16:58:14 UTC 2019


On Fri, Aug 23, 2019 at 1:54 PM Andre McCurdy <armccurdy at gmail.com> wrote:
>
> Signed-off-by: Andre McCurdy <armccurdy at gmail.com>
> ---
>  meta/classes/update-rc.d.bbclass | 17 ++++++++++++++---
>  1 file changed, 14 insertions(+), 3 deletions(-)
>
> diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass
> index 1366fee..bf86bfa 100644
> --- a/meta/classes/update-rc.d.bbclass
> +++ b/meta/classes/update-rc.d.bbclass
> @@ -1,6 +1,13 @@
>  UPDATERCPN ?= "${PN}"
>
> -DEPENDS_append_class-target = "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', ' update-rc.d initscripts', '', d)}"
> +def get_target_depends(d):
> +    if bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
> +        return 'update-rc.d initscripts'
> +    if d.getVar('VIRTUAL-RUNTIME_init_manager') == 'busybox':
> +        return 'update-rc.d'
> +    return ''
> +

checking init_manager seems more appropriate here than mixing
DISTRO_FEAUTURE and init_manage check.

> +DEPENDS_append_class-target = " ${@get_target_depends(d)}"
>
>  UPDATERCD = "update-rc.d"
>  UPDATERCD_class-cross = ""
> @@ -50,7 +57,6 @@ if ${@use_updatercd(d)} && type update-rc.d >/dev/null 2>/dev/null; then
>  fi
>  }
>
> -
>  def update_rc_after_parse(d):
>      if d.getVar('INITSCRIPT_PACKAGES', False) == None:
>          if d.getVar('INITSCRIPT_NAME', False) == None:
> @@ -62,7 +68,12 @@ python __anonymous() {
>      update_rc_after_parse(d)
>  }
>
> -PACKAGESPLITFUNCS_prepend = "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'populate_packages_updatercd ', '', d)}"
> +def get_packagesplit_funcs(d):
> +    if bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d) or d.getVar('VIRTUAL-RUNTIME_init_manager') == 'busybox':
> +        return 'populate_packages_updatercd'
> +    return ''
> +
> +PACKAGESPLITFUNCS_prepend = "${@get_packagesplit_funcs(d)} "
>  PACKAGESPLITFUNCS_remove_class-nativesdk = "populate_packages_updatercd "
>
>  populate_packages_updatercd[vardeps] += "updatercd_prerm updatercd_postrm updatercd_postinst"
> --
> 1.9.1
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


More information about the Openembedded-core mailing list