On Mon, 2012-06-18 at 10:57 +0800, Xiaofeng Yan wrote: > On 2012年06月15日 22:59, Richard Purdie wrote: > > On Fri, 2012-06-15 at 17:30 +0800, xiaofeng....@windriver.com wrote: > >> From: Xiaofeng Yan<xiaofeng....@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....@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? > Thanks for your comments. > the other provider of this is from initscripts_1.0.bb, installing all of > init-scripts in the stage of installing without using > update-alternatives. So the functions is a file instead of linking mode. > An error appear when lsbinicscritps replace initscripts if not removing > file functions. So I remove the original functions for making the latter > linking successfully. What is the purpose is for avoiding to modify the > other non-lsb bb files. The changes of this will be only in lsb image.
Right, I understand there is a conflict here. Could we not add update-alternatives support to the initscripts recipe for this file to, so its a link in both packages and then update-alternatives will take care of linking the correct one into place? Cheers, Richard _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core