[oe] [meta-OE] Remove do_install_append() from zsh recipe.

Peter Kjellerstedt peter.kjellerstedt at axis.com
Wed Mar 29 12:01:19 UTC 2017


> -----Original Message-----
> From: openembedded-devel-bounces at lists.openembedded.org
> [mailto:openembedded-devel-bounces at lists.openembedded.org] On Behalf Of
> Cody Piersall
> Sent: den 28 mars 2017 20:30
> To: openembeded-devel
> Subject: Re: [oe] [meta-OE] Remove do_install_append() from zsh recipe.
> 
> Hi Andre,
> 
> Thanks for the response.
> 
> On Tue, Mar 28, 2017 at 1:06 PM, Andre McCurdy <armccurdy at gmail.com>
> wrote:
> > On Fri, Mar 24, 2017 at 9:16 AM, Cody Piersall <cody at arrc.ou.edu>
> wrote:
> >> do_install_append() removes a lot of useful functionality from the
> zsh
> shell.
> >
> > What exactly is this "useful functionality" ?
> >
> > Maybe it could be put in a separate package.
> The recipe currently in meta-oe removes a lot of features that make zsh
> a
> powerful shell.
> A lot of zsh's nice interactive functionality is provided by files that
> live in
> /usr/share/zsh:  things like typing "cd <TAB>" only completing on
> directories,
> integration/completion with git commands, completion for various unix
> utilities.  The big
> drawback is that it takes up 5.5M of disk space.  For my platform this
> isn't an issue, but
> it could be for other people.

It definitely sounds as it should be packaged in a separate package 
then, e.g., ${PN}-extras.

> Unfortunately, the recipe I posted does not actually even work -- I
> posted
> before testing
> (I didn't set FILES correctly, and some things were expecting zsh to be
> in
> /bin instead of
> /usr/bin).  Sorry for wasting anyone's time if you tried it out.  I
> have a
> working/tested
> version now:
> 
> 
> diff --git a/meta-oe/recipes-extended/zsh/zsh_5.0.5.bb
> b/meta-oe/recipes-extended/zsh/zsh_5.0.5.bb
> index 39b2d95..1c06ef0 100644
> --- a/meta-oe/recipes-extended/zsh/zsh_5.0.5.bb
> +++ b/meta-oe/recipes-extended/zsh/zsh_5.0.5.bb
> @@ -34,6 +34,7 @@ EXTRA_OEMAKE = "-e MAKEFLAGS="
> ALTERNATIVE_${PN} = "sh"
> ALTERNATIVE_LINK_NAME[sh] = "${base_bindir}/sh"
> +ALTERNATIVE_LINK_NAME[zsh] = "${base_bindir}/zsh"

That does not do anything since there is no zsh in 
ALTERNATIVE_${PN}. And there should not be any need for it.

> ALTERNATIVE_TARGET[sh] = "${base_bindir}/${BPN}"
> ALTERNATIVE_PRIORITY = "100"
> @@ -45,7 +46,10 @@ do_configure () {
> }
> do_install_append () {
> - rm -fr ${D}/usr/share
> + if ! [ -e ${D}/bin/zsh ]; then
> + mkdir -p ${D}/bin
> + ln -s ${bindir}/zsh ${D}/bin/zsh
> + fi
> }

Please rewrite as:

do_install_append() {
	if [ ! -e ${D}${base_bindir}/zsh ]; then
		mkdir -p ${D}${base_bindir}
		ln -s ${bindir}/zsh ${D}${base_bindir}/zsh
	fi
}

> pkg_postinst_${PN} () {
> @@ -59,3 +63,8 @@ FILES_${PN}-dbg += "\
> ${libdir}/${PN}/${PV}/${PN}/db/.debug/*.so \
> ${libdir}/${PN}/${PV}/${PN}/net/.debug/*.so \
> "
> +
> +FILES_${PN} += "\
> + ${datadir}/${PN} \
> + ${base_bindir}/zsh \

No need to add ${base_bindir}/zsh as FILES_${PN} contains ${base_bindir}/* 
by default.

> +"
> 
> Cody

//Peter




More information about the Openembedded-devel mailing list