Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] lsbinitscripts: Add a linking for functions.lsbinitscripts
@ 2012-06-27  6:04 Kang Kai
  2012-06-27  6:04 ` [PATCH 1/1] " Kang Kai
  0 siblings, 1 reply; 3+ messages in thread
From: Kang Kai @ 2012-06-27  6:04 UTC (permalink / raw)
  To: openembedded-core; +Cc: Zhenfeng.Zhao

Hi,

This patch and comments are from Xiaofeng Yan <xiaofeng.yan@windriver.com>.

I remove the function of update-alternative according to Richard's suggestion and using
linking in the stage of do_install.

The following changes since commit 8ce8d25bcda0e2e0b62204d5ca5875dedcaacf7d:

  sanity.bbclass: Increase LAYER_CONF_VERSION to match bblayers change (2012-06-25 17:20:54 +0100)

are available in the git repository at:
  git://git.pokylinux.org/poky-contrib xiaofeng/lsbinitscipts
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=xiaofeng/lsbinitscipts

Xiaofeng Yan (1):
  lsbinitscripts: Add a linking for functions.lsbinitscripts

 meta/recipes-extended/lsb/lsbinitscripts_9.03.bb |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

-- 
1.7.5.4




^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/1] lsbinitscripts: Add a linking for functions.lsbinitscripts
  2012-06-27  6:04 [PATCH 0/1] lsbinitscripts: Add a linking for functions.lsbinitscripts Kang Kai
@ 2012-06-27  6:04 ` Kang Kai
  2012-06-27 16:53   ` Saul Wold
  0 siblings, 1 reply; 3+ messages in thread
From: Kang Kai @ 2012-06-27  6:04 UTC (permalink / raw)
  To: openembedded-core; +Cc: Zhenfeng.Zhao

From: Xiaofeng Yan <xiaofeng.yan@windriver.com>

The linking will fail when an original file "functions" exists.
So using the new linking replace the previous "functions".

[YOCTO #2133]

Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
---
 meta/recipes-extended/lsb/lsbinitscripts_9.03.bb |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/meta/recipes-extended/lsb/lsbinitscripts_9.03.bb b/meta/recipes-extended/lsb/lsbinitscripts_9.03.bb
index dd92a92..990da2e 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"
 
@@ -13,15 +13,12 @@ SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/initscripts/initscripts-${PV}
 
 SRC_URI[md5sum] = "668fa2762b57ef75436303857847bba3"
 SRC_URI[sha256sum] = "d56547a68ce223a7413b2676650b042125f047c8d6d139c5b970e118b3dc958a"
-inherit update-alternatives
-
-ALTERNATIVE_PRIORITY = "10"
-ALTERNATIVE_${PN} = "functions"
-ALTERNATIVE_LINK_NAME[functions] = "${sysconfdir}/init.d/functions"
 
 do_configure[noexec] = "1" 
 
 do_install(){
 	install -d ${D}/etc/init.d/
-	install -m 0755 ${S}/rc.d/init.d/functions ${D}/etc/init.d/functions
+	install -m 0755 ${S}/rc.d/init.d/functions ${D}/etc/init.d/functions.lsbinitscripts
+        cd ${D}/etc/init.d/
+        ln -sf functions.lsbinitscripts functions
 }
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] lsbinitscripts: Add a linking for functions.lsbinitscripts
  2012-06-27  6:04 ` [PATCH 1/1] " Kang Kai
@ 2012-06-27 16:53   ` Saul Wold
  0 siblings, 0 replies; 3+ messages in thread
From: Saul Wold @ 2012-06-27 16:53 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: Zhenfeng.Zhao

On 06/26/2012 11:04 PM, Kang Kai wrote:
> From: Xiaofeng Yan<xiaofeng.yan@windriver.com>
>
> The linking will fail when an original file "functions" exists.
> So using the new linking replace the previous "functions".
>
> [YOCTO #2133]
>
> Signed-off-by: Xiaofeng Yan<xiaofeng.yan@windriver.com>
> ---
>   meta/recipes-extended/lsb/lsbinitscripts_9.03.bb |   11 ++++-------
>   1 files changed, 4 insertions(+), 7 deletions(-)
>
> diff --git a/meta/recipes-extended/lsb/lsbinitscripts_9.03.bb b/meta/recipes-extended/lsb/lsbinitscripts_9.03.bb
> index dd92a92..990da2e 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"
>
> @@ -13,15 +13,12 @@ SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/initscripts/initscripts-${PV}
>
>   SRC_URI[md5sum] = "668fa2762b57ef75436303857847bba3"
>   SRC_URI[sha256sum] = "d56547a68ce223a7413b2676650b042125f047c8d6d139c5b970e118b3dc958a"
> -inherit update-alternatives
> -
> -ALTERNATIVE_PRIORITY = "10"
> -ALTERNATIVE_${PN} = "functions"
> -ALTERNATIVE_LINK_NAME[functions] = "${sysconfdir}/init.d/functions"
>
>   do_configure[noexec] = "1"
>
>   do_install(){
>   	install -d ${D}/etc/init.d/
> -	install -m 0755 ${S}/rc.d/init.d/functions ${D}/etc/init.d/functions
> +	install -m 0755 ${S}/rc.d/init.d/functions ${D}/etc/init.d/functions.lsbinitscripts
> +        cd ${D}/etc/init.d/
> +        ln -sf functions.lsbinitscripts functions
>   }

This is still not correct, you are disabling the usage update 
ALTERNATIVE here.  What you should really be doing is adding that 
support to the original initscripts_1.0.bb recipes for the function file 
and give this a higher ALTERNATIVE_PRIORITY, so that when it is 
installed it will do the right thing (tm) via the update alternative 
functionality.

Sau!



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-06-27 17:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-27  6:04 [PATCH 0/1] lsbinitscripts: Add a linking for functions.lsbinitscripts Kang Kai
2012-06-27  6:04 ` [PATCH 1/1] " Kang Kai
2012-06-27 16:53   ` Saul Wold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox