All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-OE] Remove do_install_append() from zsh recipe.
@ 2017-03-24 16:16 Cody Piersall
  2017-03-28 18:06 ` Andre McCurdy
  0 siblings, 1 reply; 4+ messages in thread
From: Cody Piersall @ 2017-03-24 16:16 UTC (permalink / raw)
  To: openembedded-devel

do_install_append() removes a lot of useful functionality from the zsh shell.
If a user requires this limited shell, they can add it in a bbappend file.
---
 meta-oe/recipes-extended/zsh/zsh_5.0.5.bb | 4 ----
 1 file changed, 4 deletions(-)

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..d5bb1b7 100644
--- a/meta-oe/recipes-extended/zsh/zsh_5.0.5.bb
+++ b/meta-oe/recipes-extended/zsh/zsh_5.0.5.bb
@@ -44,10 +44,6 @@ do_configure () {
     oe_runconf
 }
 
-do_install_append () {
-    rm -fr ${D}/usr/share
-}
-
 pkg_postinst_${PN} () {
     touch $D${sysconfdir}/shells
     grep -q "bin/zsh" $D${sysconfdir}/shells || echo /bin/zsh >> $D${sysconfdir}/shells
-- 
1.9.1



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

* Re: [meta-OE] Remove do_install_append() from zsh recipe.
  2017-03-24 16:16 [meta-OE] Remove do_install_append() from zsh recipe Cody Piersall
@ 2017-03-28 18:06 ` Andre McCurdy
  2017-03-28 18:29   ` Cody Piersall
  0 siblings, 1 reply; 4+ messages in thread
From: Andre McCurdy @ 2017-03-28 18:06 UTC (permalink / raw)
  To: Cody Piersall; +Cc: openembeded-devel

On Fri, Mar 24, 2017 at 9:16 AM, Cody Piersall <cody@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.

> If a user requires this limited shell, they can add it in a bbappend file.
> ---
>  meta-oe/recipes-extended/zsh/zsh_5.0.5.bb | 4 ----
>  1 file changed, 4 deletions(-)
>
> 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..d5bb1b7 100644
> --- a/meta-oe/recipes-extended/zsh/zsh_5.0.5.bb
> +++ b/meta-oe/recipes-extended/zsh/zsh_5.0.5.bb
> @@ -44,10 +44,6 @@ do_configure () {
>      oe_runconf
>  }
>
> -do_install_append () {
> -    rm -fr ${D}/usr/share
> -}
> -
>  pkg_postinst_${PN} () {
>      touch $D${sysconfdir}/shells
>      grep -q "bin/zsh" $D${sysconfdir}/shells || echo /bin/zsh >> $D${sysconfdir}/shells
> --
> 1.9.1
>
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel


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

* Re: [meta-OE] Remove do_install_append() from zsh recipe.
  2017-03-28 18:06 ` Andre McCurdy
@ 2017-03-28 18:29   ` Cody Piersall
  2017-03-29 12:01     ` Peter Kjellerstedt
  0 siblings, 1 reply; 4+ messages in thread
From: Cody Piersall @ 2017-03-28 18:29 UTC (permalink / raw)
  To: openembeded-devel

Hi Andre,

Thanks for the response.

On Tue, Mar 28, 2017 at 1:06 PM, Andre McCurdy <armccurdy@gmail.com> wrote:
> On Fri, Mar 24, 2017 at 9:16 AM, Cody Piersall <cody@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.

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"
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
}
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 \
+"

Cody


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

* Re: [meta-OE] Remove do_install_append() from zsh recipe.
  2017-03-28 18:29   ` Cody Piersall
@ 2017-03-29 12:01     ` Peter Kjellerstedt
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Kjellerstedt @ 2017-03-29 12:01 UTC (permalink / raw)
  To: Cody Piersall, openembeded-devel

> -----Original Message-----
> From: openembedded-devel-bounces@lists.openembedded.org
> [mailto:openembedded-devel-bounces@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@gmail.com>
> wrote:
> > On Fri, Mar 24, 2017 at 9:16 AM, Cody Piersall <cody@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



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

end of thread, other threads:[~2017-03-29 12:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-24 16:16 [meta-OE] Remove do_install_append() from zsh recipe Cody Piersall
2017-03-28 18:06 ` Andre McCurdy
2017-03-28 18:29   ` Cody Piersall
2017-03-29 12:01     ` Peter Kjellerstedt

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.