Gentoo Archives: gentoo-dev

From: Patrice Clement <monsieurp@g.o>
To: gentoo-dev@l.g.o
Cc: vim@l.g.o
Subject: [gentoo-dev] [PATCH] eclass/vim-plugin.eclass: delete if has_version condition.
Date: Wed, 21 Jul 2021 16:47:09
Message-Id: 20210721164700.10813-1-monsieurp@gentoo.org
1 ... and replace it with a test against the REPLACING_VERSIONS variable.
2
3 See https://projects.gentoo.org/pms/8/pms.html#x1-10900011.1.
4
5 Patch courtesy of Arfrever.
6
7 Closes: https://github.com/gentoo/gentoo/pull/21733
8 Signed-off-by: Patrice Clement <monsieurp@g.o>
9 ---
10 eclass/vim-plugin.eclass | 12 ++++++------
11 1 file changed, 6 insertions(+), 6 deletions(-)
12
13 diff --git a/eclass/vim-plugin.eclass b/eclass/vim-plugin.eclass
14 index 6b72d66111d..460edcce3eb 100644
15 --- a/eclass/vim-plugin.eclass
16 +++ b/eclass/vim-plugin.eclass
17 @@ -126,31 +126,31 @@ update_vim_afterscripts() {
18 display_vim_plugin_help() {
19 local h
20
21 - if ! has_version ${CATEGORY}/${PN} ; then
22 - if [[ -n "${VIM_PLUGIN_HELPFILES}" ]] ; then
23 + if [[ -z ${REPLACING_VERSIONS} ]]; then
24 + if [[ -n "${VIM_PLUGIN_HELPFILES}" ]]; then
25 elog " "
26 elog "This plugin provides documentation via vim's help system. To"
27 elog "view it, use:"
28 - for h in ${VIM_PLUGIN_HELPFILES} ; do
29 + for h in ${VIM_PLUGIN_HELPFILES}; do
30 elog " :help ${h}"
31 done
32 elog " "
33
34 - elif [[ -n "${VIM_PLUGIN_HELPTEXT}" ]] ; then
35 + elif [[ -n "${VIM_PLUGIN_HELPTEXT}" ]]; then
36 elog " "
37 while read h ; do
38 elog "$h"
39 done <<<"${VIM_PLUGIN_HELPTEXT}"
40 elog " "
41
42 - elif [[ -n "${VIM_PLUGIN_HELPURI}" ]] ; then
43 + elif [[ -n "${VIM_PLUGIN_HELPURI}" ]]; then
44 elog " "
45 elog "Documentation for this plugin is available online at:"
46 elog " ${VIM_PLUGIN_HELPURI}"
47 elog " "
48 fi
49
50 - if has "filetype" "${VIM_PLUGIN_MESSAGES}" ; then
51 + if has "filetype" "${VIM_PLUGIN_MESSAGES}"; then
52 elog "This plugin makes use of filetype settings. To enable these,"
53 elog "add lines like:"
54 elog " filetype plugin on"
55 --
56 2.31.1

Replies