All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Jansa <martin.jansa@gmail.com>
To: jackie.huang@windriver.com, openembedded-devel@lists.openembedded.org
Cc: openembedded-commits@lists.openembedded.org
Subject: Re: [oe-commits] Jackie Huang : vim: add recipe for vim-tiny
Date: Thu, 19 Feb 2015 16:22:51 +0100	[thread overview]
Message-ID: <20150219152251.GC2311@jama> (raw)
In-Reply-To: <20150115153808.97C47501EF@opal.openembedded.org>

[-- Attachment #1: Type: text/plain, Size: 4333 bytes --]

On Thu, Jan 15, 2015 at 03:38:08PM +0000, git@git.openembedded.org wrote:
> Module: meta-openembedded.git
> Branch: master
> Commit: 95dc2ddce7a0ee4d16d6c69fd123e4e6921bdf2e
> URL:    http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=95dc2ddce7a0ee4d16d6c69fd123e4e6921bdf2e
> 
> Author: Jackie Huang <jackie.huang@windriver.com>
> Date:   Thu Nov  6 03:22:27 2014 -0500
> 
> vim: add recipe for vim-tiny
> 
> Changes:
> - Add bb for vim-tiny based on vim.bb
> - Change PACKAGECONFIG and do_install for vim-tiny
> - Change BPN to vim in vim.bb so it works fine when required by vim-tiny
> - Add proper alternative links for vim and vim-tiny to avoid conflicts
> - Don't use do_install_append in vim.bb so it works fine when required by vim-tiny
> 
> Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> 
> ---
> 
>  meta-oe/recipes-support/vim/vim-tiny_7.4.481.bb | 13 +++++++++++++
>  meta-oe/recipes-support/vim/vim_7.4.481.bb      | 20 +++++++++++++-------
>  2 files changed, 26 insertions(+), 7 deletions(-)
> 
> diff --git a/meta-oe/recipes-support/vim/vim-tiny_7.4.481.bb b/meta-oe/recipes-support/vim/vim-tiny_7.4.481.bb
> new file mode 100644
> index 0000000..bb8f2b7
> --- /dev/null
> +++ b/meta-oe/recipes-support/vim/vim-tiny_7.4.481.bb
> @@ -0,0 +1,13 @@
> +require vim_${PV}.bb
> +
> +SUMMARY += " (with tiny features)"
> +
> +PACKAGECONFIG += "tiny"
> +
> +do_install() {
> +    install -d ${D}/${bindir}
> +    install -m 0755 ${S}/vim ${D}/${bindir}/vim.tiny
> +}
> +
> +ALTERNATIVE_PRIORITY = "90"
> +ALTERNATIVE_TARGET = "${bindir}/vim.tiny"
> diff --git a/meta-oe/recipes-support/vim/vim_7.4.481.bb b/meta-oe/recipes-support/vim/vim_7.4.481.bb
> index b85ff63..7490229 100644
> --- a/meta-oe/recipes-support/vim/vim_7.4.481.bb
> +++ b/meta-oe/recipes-support/vim/vim_7.4.481.bb
> @@ -12,9 +12,9 @@ SRC_URI = "hg://vim.googlecode.com/hg/;protocol=https;module=vim \
>  "
>  SRCREV = "v7-4-481"
>  
> -S = "${WORKDIR}/${BPN}/src"
> +S = "${WORKDIR}/vim/src"
>  
> -VIMDIR = "${BPN}${@d.getVar('PV',1).split('.')[0]}${@d.getVar('PV',1).split('.')[1]}"
> +VIMDIR = "vim${@d.getVar('PV',1).split('.')[0]}${@d.getVar('PV',1).split('.')[1]}"
>  
>  inherit autotools update-alternatives
>  inherit autotools-brokensep
> @@ -59,7 +59,9 @@ EXTRA_OECONF = " \
>      STRIP=/bin/true \
>  "
>  
> -do_install_append() {
> +do_install() {
> +    autotools_do_install
> +
>      # Work around rpm picking up csh or awk or perl as a dep
>      chmod -x ${D}${datadir}/${BPN}/${VIMDIR}/tools/vim132
>      chmod -x ${D}${datadir}/${BPN}/${VIMDIR}/tools/mve.awk
> @@ -67,6 +69,9 @@ do_install_append() {
>  
>      # Install example vimrc from runtime files
>      install -m 0644 ../runtime/vimrc_example.vim ${D}/${datadir}/${BPN}/vimrc
> +
> +    # we use --with-features=big as default
> +    mv ${D}${bindir}/${BPN} ${D}${bindir}/${BPN}.${BPN}
>  }
>  
>  PARALLEL_MAKEINST = ""
> @@ -97,7 +102,8 @@ RDEPENDS_${PN} = "ncurses-terminfo-base"
>  # Recommend that runtime data is installed along with vim
>  RRECOMMENDS_${PN} = "${PN}-syntax ${PN}-help ${PN}-tutor ${PN}-vimrc ${PN}-common"
>  
> -ALTERNATIVE_${PN} = "vi"
> -ALTERNATIVE_TARGET[vi] = "${bindir}/${BPN}"
> -ALTERNATIVE_LINK_NAME[vi] = "${base_bindir}/vi"
> -ALTERNATIVE_PRIORITY[vi] = "100"
> +ALTERNATIVE_${PN} = "vi vim"
> +ALTERNATIVE_TARGET = "${bindir}/${BPN}.${BPN}"
> +ALTERNATIVE_LINK_NAME[vi] = "${bindir}/vi"
> +ALTERNATIVE_LINK_NAME[vim] = "${bindir}/vim"

Why did you change ALTERNATIVE_LINK_NAME[vi] from base_bindir to bindir?

busybox still registers ${base_bindir}/vi so this breaks u-a

update-alternatives: Error: cannot register alternative vi to
/usr/bin/vi since it is already registered to /bin/vi
update-alternatives: Linking
/OE/build/shr-core/tmp-glibc/work/nokia900-oe-linux-gnueabi/shr-image/2.0-r20/rootfs/usr/bin/vim
to /usr/bin/vim.vim

> +ALTERNATIVE_PRIORITY = "100"
> 
> -- 
> _______________________________________________
> Openembedded-commits mailing list
> Openembedded-commits@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-commits

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]

           reply	other threads:[~2015-02-19 15:22 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20150115153808.97C47501EF@opal.openembedded.org>]

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=20150219152251.GC2311@jama \
    --to=martin.jansa@gmail.com \
    --cc=jackie.huang@windriver.com \
    --cc=openembedded-commits@lists.openembedded.org \
    --cc=openembedded-devel@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.