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: Thu, 22 Jul 2021 08:54:11
Message-Id: 20210722085402.6666-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 This is an updated version of the same patch discussed previously on this ML.
6
7 Suggested by Arfrever.
8 ---
9 eclass/vim-plugin.eclass | 12 ++++++------
10 1 file changed, 6 insertions(+), 6 deletions(-)
11
12 diff --git a/eclass/vim-plugin.eclass b/eclass/vim-plugin.eclass
13 index 6b72d66111d..460edcce3eb 100644
14 --- a/eclass/vim-plugin.eclass
15 +++ b/eclass/vim-plugin.eclass
16 @@ -126,31 +126,31 @@ update_vim_afterscripts() {
17 display_vim_plugin_help() {
18 local h
19
20 - if ! has_version ${CATEGORY}/${PN} ; then
21 - if [[ -n "${VIM_PLUGIN_HELPFILES}" ]] ; then
22 + if [[ -z ${REPLACING_VERSIONS} ]]; then
23 + if [[ -n ${VIM_PLUGIN_HELPFILES} ]]; then
24 elog " "
25 elog "This plugin provides documentation via vim's help system. To"
26 elog "view it, use:"
27 - for h in ${VIM_PLUGIN_HELPFILES} ; do
28 + for h in ${VIM_PLUGIN_HELPFILES}; do
29 elog " :help ${h}"
30 done
31 elog " "
32
33 - elif [[ -n "${VIM_PLUGIN_HELPTEXT}" ]] ; then
34 + elif [[ -n ${VIM_PLUGIN_HELPTEXT} ]]; then
35 elog " "
36 while read h ; do
37 elog "$h"
38 done <<<"${VIM_PLUGIN_HELPTEXT}"
39 elog " "
40
41 - elif [[ -n "${VIM_PLUGIN_HELPURI}" ]] ; then
42 + elif [[ -n ${VIM_PLUGIN_HELPURI} ]]; then
43 elog " "
44 elog "Documentation for this plugin is available online at:"
45 elog " ${VIM_PLUGIN_HELPURI}"
46 elog " "
47 fi
48
49 - if has "filetype" "${VIM_PLUGIN_MESSAGES}" ; then
50 + if has filetype ${VIM_PLUGIN_MESSAGES}; then
51 elog "This plugin makes use of filetype settings. To enable these,"
52 elog "add lines like:"
53 elog " filetype plugin on"
54 --
55 2.31.1

Replies