Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 597304

Summary: vim-plugin.eclass: display_vim_plugin_help() does nothing in pkg_postinst()
Product: Gentoo Linux Reporter: eroen <erikdenstore+gbugs>
Component: EclassesAssignee: Vim Maintainers <vim>
Status: RESOLVED FIXED    
Severity: normal CC: itumaykin+gentoo, t
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

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.