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

    From Anna Vyalkova@21:1/5 to Thomas Bracht Laumann Jespersen on Wed Apr 6 12:00:01 2022
    On 2022-04-06 11:10, Thomas Bracht Laumann Jespersen wrote:
    Already merged, but posting here in case anyone wants to double-check.

    Please follow what devmanual says:

    Before updating any eclass, email patches to the gentoo-dev list. It
    may be that your proposed change is broken in a way you had not
    anticipated, or that there is an existing function which performs the
    same purpose, or that your function may be better off in its own
    eclass. If you don't email gentoo-dev first, and end up breaking
    something, expect to be in a lot of trouble.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Thomas Bracht Laumann Jespersen@21:1/5 to All on Wed Apr 6 11:20:01 2022
    Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz>
    ---
    Already merged, but posting here in case anyone wants to double-check.

    eclass/vim-doc.eclass | 40 ++++++++++++++++++++--------------------
    1 file changed, 20 insertions(+), 20 deletions(-)

    diff --git a/eclass/vim-doc.eclass b/eclass/vim-doc.eclass
    index ba9d00f4f5e..de28ddfdfee 100644
    --- a/eclass/vim-doc.eclass
    +++ b/eclass/vim-doc.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-doc.eclass
    # @MAINTAINER:
    # vim@gentoo.org
    -# @SUPPORTED_EAPIS: 6 7
    +# @SUPPORTED_EAPIS: 6 7 8
    # @BLURB: Eclass for vim{,-plugin}.eclass to update documentation tags.
    # @DESCRIPTION:
    # This eclass is used by vim.eclass and vim-plugin.eclass to update
    @@ -16,8 +16,8 @@
    # DEPEND in vim-plugin or by whatever version of vim is being
    # installed by the eclass.

    -case ${EAPI:-0} in
    - [67]) ;;
    +case ${EAPI} in
    + 6|7|8) ;;
    *) die "${ECLASS}: EAPI ${EAPI:-0} n
  • From Ulrich Mueller@21:1/5 to All on Wed Apr 6 13:00:01 2022
    On Wed, 06 Apr 2022, Thomas Bracht Laumann Jespersen wrote:

    - find $d/doc -name \*.txt -type l | while read s; do
    - [[ $(readlink "$s") = $vimfiles/* ]] && rm -f "$s"
    + find ${d}/doc -name \*.txt -type l | while read s; do
    + [[ $(readlink "${s}") = $vimfiles/* ]] && rm -f "${s}"

    This would profit from a "|| die" statement.

    - einfo "Removing $d"
    - rm -r "$d"
    + einfo "Removing ${d}"
    + rm -r "${d}"

    Ditto.

    - if [[ -d $vimfiles/doc ]]; then
    - ln -s $vimfiles/doc/*.txt $d/doc 2>/dev/null
    + if [[ -d "${vimfiles}"/doc ]]; then
    + ln -s "${vimfiles}"/doc/*.txt "${d}/doc" 2>/dev/null

    Ditto.

    Ulrich

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anna Vyalkova@21:1/5 to Ulrich Mueller on Wed Apr 6 14:10:01 2022
    On 2022-04-06 12:54, Ulrich Mueller wrote:
    On Wed, 06 Apr 2022, Thomas Bracht Laumann Jespersen wrote:

    - find $d/doc -name \*.txt -type l | while read s; do
    - [[ $(readlink "$s") = $vimfiles/* ]] && rm -f "$s"
    + find ${d}/doc -name \*.txt -type l | while read s; do
    + [[ $(readlink "${s}") = $vimfiles/* ]] && rm -f "${s}"

    This would profit from a "|| die" statement.

    This needs to be nonfatal.

    - einfo "Removing $d"
    - rm -r "$d"
    + einfo "Removing ${d}"
    + rm -r "${d}"

    Ditto.

    - if [[ -d $vimfiles/doc ]]; then
    - ln -s $vimfiles/doc/*.txt $d/doc 2>/dev/null
    + if [[ -d "${vimfiles}"/doc ]]; then
    + ln -s "${vimfiles}"/doc/*.txt "${d}/doc" 2>/dev/null

    Ditto.

    This one only works when nonfatal too.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anna Vyalkova@21:1/5 to Anna Vyalkova on Wed Apr 6 14:10:02 2022
    On 2022-04-06 17:01, Anna Vyalkova wrote:
    On 2022-04-06 12:54, Ulrich Mueller wrote:
    On Wed, 06 Apr 2022, Thomas Bracht Laumann Jespersen wrote:

    - find $d/doc -name \*.txt -type l | while read s; do
    - [[ $(readlink "$s") = $vimfiles/* ]] && rm -f "$s"
    + find ${d}/doc -name \*.txt -type l | while read s; do
    + [[ $(readlink "${s}") = $vimfiles/* ]] && rm -f "${s}"

    This would profit from a "|| die" statement.

    This needs to be nonfatal.

    No, it works fine with "|| die" too. I messed up with the syntax.

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