• [gentoo-dev] [PATCH 2/2] vim-plugin.eclass: support EAPI 8

    From Thomas Bracht Laumann Jespersen@21:1/5 to All on Wed Apr 6 11:20:01 2022
    * Drop EAPI 0, 1, 2 workarounds
    * Move EXPORT_FUNCTIONS to end of file
    * Add required @USAGE on functions

    Bug: https://bugs.gentoo.org/830867
    Bug: https://bugs.gentoo.org/830866
    Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz>
    ---
    Already merged, but posting here in case anyone wants to double-check.

    eclass/vim-plugin.eclass | 19 ++++++++++---------
    1 file changed, 10 insertions(+), 9 deletions(-)

    diff --git a/eclass/vim-plugin.eclass b/eclass/vim-plugin.eclass
    index 50e727e98f4..d5cc5e7b4db 100644
    --- a/eclass/vim-plugin.eclass
    +++ b/eclass/vim-plugin.eclass
    @@ -1,10 +1,10 @@
    -# Copyright 1999-2021 Gentoo Authors
    +# Copyright 1999-2022 Gentoo Authors
    # Distributed under the terms of the GNU General Public License v2

    # @ECLASS: vim-plugin.eclass
    # @MAINTAINER:
    # vim@gentoo.org
    -# @SUPPORTED_EAPIS: 6 7
    +# @SUPPORTED_EAPIS: 6 7 8
    # @BLURB: used for installing vim plugins
    # @DESCRIPTION:
    # This eclass simplifies installation of app-vim plugins into
    @@ -13,12 +13,11 @@
    # documentation, for which we make a special case via vim-doc.eclass.

    case ${EAPI} in
    - 6|7);;
    - *) die "EAPI ${EAPI:-0} unsupported (too old)";;
    + 6|7|8);;
    + *) die "${ECLASS}: EAPI ${EAPI:-0} unsupported (too old)";;
    esac
  • From Anna Vyalkova@21:1/5 to Anna Vyalkova on Wed Apr 6 12:10:01 2022
    On 2022-04-06 14:56, Anna Vyalkova wrote:
    Current vim eclass is supposed to use distfiles from Gentoo devspaces
    but not from GitHub and forges.

    Could you change vim-plugin_src_install behavior for EAPI 8? So it
    installs not all directories but only whitelisted ones? I'd appreciate
    this change.

    P.S. Also I propose a function that helps to avoid file conflicts with
    other plugins. See what I'm using in ebuilds now for reference.

    src_prepare() {
    default

    # avoid collision with other packages
    cd after/syntax || die
    for file in *.vim; do
    mkdir "${file%.vim}" || die
    mv "${file}" "${file%.vim}/${PN}.vim" || die
    done
    }

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anna Vyalkova@21:1/5 to All on Wed Apr 6 12:00:01 2022
    Current vim eclass is supposed to use distfiles from Gentoo devspaces
    but not from GitHub and forges.

    Could you change vim-plugin_src_install behavior for EAPI 8? So it
    installs not all directories but only whitelisted ones? I'd appreciate
    this change.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anna Vyalkova@21:1/5 to All on Wed Apr 6 14:30:01 2022
    I made changed requested by ulm and wrote my own patches.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anna Vyalkova@21:1/5 to All on Wed Apr 6 16:00:01 2022
    I was told that EXPORT_FUNCTIONS needs to be outside the inherit guard.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Thomas Bracht Laumann Jespersen@21:1/5 to All on Thu Apr 7 13:50:01 2022
    Could you post a v4 as a separate thread, and not as a reply to the previous patches? For some reason, neomutt is ordering patches 1 and 2 _after_ the other six making it hard to apply from the mailbox :-) Feel free to drop my initial patches, I think you rework is so much better.

    I looked over sam's requested changes from last year [0], and I think you've addressed all the points. Only one I don't know if was addressed was this one:

    - In update_vim_afterscripts, the einfo seems (at first glance) to be misleading. \
    Should it be printing ${afterdir} instead?

    [0]: https://marc.info/?l=gentoo-dev&m=162692547126278&w=2

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)