app-misc/pet: fix pkg_postinst (wrt #650096), use has_version
authorVladimir Pavljuchenkov (SpiderX) <spiderx@spiderx.dp.ua>
Sun, 17 Jun 2018 11:49:17 +0000 (14:49 +0300)
committerMichał Górny <mgorny@gentoo.org>
Sun, 17 Jun 2018 12:29:53 +0000 (14:29 +0200)
1. renamed pkg_postinstall to pkg_postinst (wrt #650096)
2. has_version used in conjunction with einfo

Closes: https://bugs.gentoo.org/650096
Closes: https://github.com/gentoo/gentoo/pull/7413
Package-Manager: Portage-2.3.40, Repoman-2.3.9

app-misc/pet/pet-0.3.0.ebuild

index f8536874f3a1f263a4826052c95770dc1c977fc0..991478810dcf6217d38d2f3370bd344874c9dea8 100644 (file)
@@ -48,10 +48,13 @@ src_install() {
 
        if use zsh-completion ; then
                insinto /usr/share/zsh/site-functions
-               doins src/github.com/knqyf263/pet/misc/completions/zsh/_${PN}
+               doins src/github.com/knqyf263/pet/misc/completions/zsh/_pet
        fi
 }
 
-pkg_postinstall() {
-       einfo "You should consider to install app-shells/peco to be able to use selector command"
+pkg_postinst() {
+       if ! has_version app-shells/peco ; then
+               einfo "You should consider to install app-shells/peco"
+               einfo "to be able to use selector command"
+       fi
 }