commit:     9690bfe5333ba0c1da42b58e4865aa607d3bf2d3
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 25 21:33:29 2024 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Thu Jul 25 21:47:36 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9690bfe5

app-eselect/eselect-wine: make postinst warning more visible

Kind of occasional but it confuse a user now and then, try to increase
chances that it will be spotted on first merge. Also extend a bit given
some shells (like fish) need special attention.

Bug: https://bugs.gentoo.org/936641
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 .../eselect-wine/eselect-wine-2.0.2-r2.ebuild      | 27 ++++++++++++----------
 1 file changed, 15 insertions(+), 12 deletions(-)

diff --git a/app-eselect/eselect-wine/eselect-wine-2.0.2-r2.ebuild 
b/app-eselect/eselect-wine/eselect-wine-2.0.2-r2.ebuild
index da39532a82a4..3c19a046d3b2 100644
--- a/app-eselect/eselect-wine/eselect-wine-2.0.2-r2.ebuild
+++ b/app-eselect/eselect-wine/eselect-wine-2.0.2-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2022-2023 Gentoo Authors
+# Copyright 2022-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -69,23 +69,26 @@ pkg_postinst() {
        if [[ ! ${REPLACING_VERSIONS##* } ]] ||
                ver_test ${REPLACING_VERSIONS##* } -lt 2; then
                elog
-               [[ ${REPLACING_VERSIONS} ]] &&
-                       elog "${PN} changed a bit, suggest reviewing 'eselect 
wine help' (and list)."
-               elog "Please run '. ${EROOT}/etc/profile' to update PATH in 
current shells"
-               elog "(PATH should have ':${EPREFIX}/etc/eselect/wine/bin'). 
Wine can otherwise"
-               elog "be executed directly from 
'${EPREFIX}/etc/eselect/wine/bin/wine'."
+               elog "Warning:"
+               elog
+               elog "Please either run '. ${EPREFIX}/etc/profile' to update 
PATH in current shells"
+               elog "or re-login, otherwise running e.g. 'wine' without the 
full path will fail."
+               elog "(PATH should have ':${EPREFIX}/etc/eselect/wine/bin'). If 
needed, selected"
+               elog "'wine' can be executed using 
'${EPREFIX}/etc/eselect/wine/bin/wine'."
+               elog
+               elog "If still have issues, verify that shell configurations in 
\$HOME are not"
+               elog "overriding PATH, also non-POSIX shells (e.g. fish) may 
need manual handling."
+               elog
+               # note: not using EROOT given it wouldn't make much sense to 
update configs
+               # using that path or source profile outside the ROOT
        fi
 
        if [[ ${REPLACING_VERSIONS##* } ]] &&
                ver_test ${REPLACING_VERSIONS##* } -lt 2.0.2-r1; then
-               elog
-               elog "Be warned that >=${PN}-2.0.2-r1 no longer installs the"
-               elog "'${EPREFIX}/usr/bin/wine' symbolic link. wine(1) can 
still be found"
+               elog "Note that >=${PN}-2.0.2-r1 no longer installs the"
+               elog "'${EPREFIX}/usr/bin/wine' symbolic link. 'wine' can still 
be found"
                elog "in PATH but, if using the direct location for scripts 
and/or binfmt,"
                elog "then please update these to use: 
'${EPREFIX}/etc/eselect/wine/bin/wine'"
-               elog
-               elog "If wine is not found in PATH, please ensure that not 
overriding the"
-               elog "default PATH value that should include 
':${EPREFIX}/etc/eselect/wine/bin'"
        fi
 }
 

Reply via email to