All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Cc: Zhenfeng.Zhao@windriver.com
Subject: Re: [PATCH 1/2] initscripts: use update-alternative to handle file functions
Date: Tue, 03 Jul 2012 14:53:21 +0100	[thread overview]
Message-ID: <1341323601.3906.6.camel@ted> (raw)
In-Reply-To: <4460a45a7ab14ef1075dd5a1ba27075e11d036b7.1340873279.git.kai.kang@windriver.com>

On Thu, 2012-06-28 at 17:35 +0800, Kang Kai wrote:
> lsb need a more abundant /etc/init.d/functions file to handle lsb test.
> Use update-alternative to install file funtions in package initscripts,
> when package lsbinitscripts installed the file functions of
> lsbinitscripts will be used.
> 
> Signed-off-by: Kang Kai <kai.kang@windriver.com>
> ---
>  meta/recipes-core/initscripts/initscripts_1.0.bb |   10 ++++++++--
>  1 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb b/meta/recipes-core/initscripts/initscripts_1.0.bb
> index 829694b..78c27a3 100644
> --- a/meta/recipes-core/initscripts/initscripts_1.0.bb
> +++ b/meta/recipes-core/initscripts/initscripts_1.0.bb
> @@ -3,7 +3,7 @@ DESCRIPTION = "Initscripts provide the basic system startup initialization scrip
>  SECTION = "base"
>  LICENSE = "GPLv2"
>  LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
> -PR = "r134"
> +PR = "r135"
>  
>  INHIBIT_DEFAULT_DEPS = "1"
>  
> @@ -37,6 +37,12 @@ SRC_URI_append_arm = " file://alignment.sh"
>  
>  KERNEL_VERSION = ""
>  
> +inherit update-alternatives
> +
> +ALTERNATIVE_PRIORITY = "90"
> +ALTERNATIVE_${PN} = "functions"
> +ALTERNATIVE_LINK_NAME[functions] = "${sysconfdir}/init.d/functions"
> +
>  HALTARGS ?= "-d -f"
>  
>  do_configure() {
> @@ -60,7 +66,7 @@ do_install () {
>  	install -d ${D}${sysconfdir}/default
>  	install -d ${D}${sysconfdir}/default/volatiles
>  
> -	install -m 0644    ${WORKDIR}/functions		${D}${sysconfdir}/init.d
> +	install -m 0644    ${WORKDIR}/functions		${D}${sysconfdir}/init.d/functions.${BPN}
>  	install -m 0755    ${WORKDIR}/bootmisc.sh	${D}${sysconfdir}/init.d
>  	install -m 0755    ${WORKDIR}/checkroot.sh	${D}${sysconfdir}/init.d
>  #	install -m 0755    ${WORKDIR}/finish.sh		${D}${sysconfdir}/init.d

Won't the code in the class handling this renaming itself?

Cheers,

Richard





  reply	other threads:[~2012-07-03 14:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-28  9:35 [PATCH 0/2] Fix lsbinitscripts link problem Kang Kai
2012-06-28  9:35 ` [PATCH 1/2] initscripts: use update-alternative to handle file functions Kang Kai
2012-07-03 13:53   ` Richard Purdie [this message]
2012-06-28  9:35 ` [PATCH 2/2] lsbinitscripts: Add a linking for functions.lsbinitscripts Kang Kai
2012-07-07  0:43   ` Saul Wold
2012-07-09  1:33     ` Kang Kai
2012-07-03  1:42 ` [PATCH 0/2] Fix lsbinitscripts link problem Kang Kai
2012-07-03  4:04   ` Saul Wold
2012-07-03  5:49     ` Kang Kai
2012-07-09  2:26 [PATCH 0/2] V3: " Kang Kai
2012-07-09  2:26 ` [PATCH 1/2] initscripts: use update-alternative to handle file functions Kang Kai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1341323601.3906.6.camel@ted \
    --to=richard.purdie@linuxfoundation.org \
    --cc=Zhenfeng.Zhao@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.