Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 597304 - vim-plugin.eclass: display_vim_plugin_help() does nothing in pkg_postinst()
Summary: vim-plugin.eclass: display_vim_plugin_help() does nothing in pkg_postinst()
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Vim Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-16 17:22 UTC by eroen
Modified: 2022-04-13 21:00 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description eroen 2016-10-16 17:22:46 UTC
vim-plugin.eclass[1] runs display_vim_plugin_help() in pkg_postinst().

vim-plugin_pkg_postinst() {
	update_vim_helptags		# from vim-doc
	update_vim_afterscripts	# see below
	display_vim_plugin_help	# see below
}

The body of this function is inside a condition that will never be satisfied:

	if ! has_version ${CATEGORY}/${PN} ; then
		if [[ -n "${VIM_PLUGIN_HELPFILES}" ]] ; then
			...

`has_version ${CATEGORY}/${PN}` will always be true in pkg_postinst().

I suggest running display_vim_plugin_help() in pkg_preinst() in stead. Other options are to remove the condition and always print the information, or checking the contents of REPLACING_VERSIONS.

AFICT this check has never actually worked correctly[2]. Prior to that change, messages were always printed.

1: https://gitweb.gentoo.org/repo/gentoo.git/tree/eclass/vim-plugin.eclass
2: https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/eclass/vim-plugin.eclass?r1=1.29&r2=1.30
Comment 1 Thomas Bracht Laumann Jespersen 2022-04-13 20:52:55 UTC
Fixed in this commit: https://gitweb.gentoo.org/repo/gentoo.git/commit/eclass/vim-plugin.eclass?id=d2194b951c8a8fbdce77ccafae4356d44c2a29c7

Thanks to CyberTailor for pointing it out.