[OE-core] [PATCH 2/3] lsbinitscripts: Remove original /etc/init.d/functions when building an lsb image

Richard Purdie richard.purdie at linuxfoundation.org
Fri Jun 15 14:59:53 UTC 2012


On Fri, 2012-06-15 at 17:30 +0800, xiaofeng.yan at windriver.com wrote:
> From: Xiaofeng Yan <xiaofeng.yan at windriver.com>
> 
> The linking will fail when an original functions exist. So remove the
> original functions when building an lsb image and make functions linking to
> functions.lsbinitscripts successfully.
> 
> [YOCTO #2133]
> 
> Signed-off-by: Xiaofeng Yan <xiaofeng.yan at windriver.com>
> ---
>  meta/recipes-extended/lsb/lsbinitscripts_9.03.bb |    8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-extended/lsb/lsbinitscripts_9.03.bb b/meta/recipes-extended/lsb/lsbinitscripts_9.03.bb
> index dd92a92..73bea2f 100644
> --- a/meta/recipes-extended/lsb/lsbinitscripts_9.03.bb
> +++ b/meta/recipes-extended/lsb/lsbinitscripts_9.03.bb
> @@ -2,7 +2,7 @@ DESCRIPTION = "SysV init scripts which only is used in an LSB image"
>  SECTION = "base"
>  LICENSE = "GPLv2"
>  DEPENDS = "popt"
> -PR = "r0"
> +PR = "r1"
>  
>  LIC_FILES_CHKSUM = "file://COPYING;md5=ebf4e8b49780ab187d51bd26aaa022c6"
>  
> @@ -25,3 +25,9 @@ do_install(){
>  	install -d ${D}/etc/init.d/
>  	install -m 0755 ${S}/rc.d/init.d/functions ${D}/etc/init.d/functions
>  }
> +
> +pkg_postinst_${PN} () {
> +	if [ -f "/etc/init.d/functions" ]; then
> +		rm -f /etc/init.d/functions
> +	fi
> +}

This looks highly suspicious to me. Shouldn't the other provider of this
be put under control for update-alternatives too or something?

Cheers,

Richard





More information about the Openembedded-core mailing list