commit:     59f5a7a6520eafedacc453910fb7f5f13c5ccb9e
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 18 05:34:39 2023 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Sat Mar 18 23:22:12 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=59f5a7a6

www-client/qutebrowser: warn in 2.5.4 if downgrade from Qt6

Should have very few users actually using Qt6 (USE is masked,
and ebuilds are unkeyworded), but given removed the _pre ebuild
it's possible it'll cause an unexpected downgrade and it wouldn't
hurt to warn (albeit should be fairly noticeable given the deps
pulled are non-trivial).

Switching will be less of a worry in qutebrowser-3.0.0 given it
can detect a mismatch on startup, but the old 2.5.4 is oblivious.

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 www-client/qutebrowser/qutebrowser-2.5.4.ebuild | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/www-client/qutebrowser/qutebrowser-2.5.4.ebuild 
b/www-client/qutebrowser/qutebrowser-2.5.4.ebuild
index 30a3498c8cf8..59de8c56dd4a 100644
--- a/www-client/qutebrowser/qutebrowser-2.5.4.ebuild
+++ b/www-client/qutebrowser/qutebrowser-2.5.4.ebuild
@@ -131,6 +131,12 @@ python_install_all() {
        einstalldocs
 }
 
+pkg_preinst() {
+       xdg_pkg_preinst
+
+       has_version "${CATEGORY}/${PN}[qt6]" && QUTEBROWSER_HAD_QT6=
+}
+
 pkg_postinst() {
        xdg_pkg_postinst
 
@@ -139,4 +145,13 @@ pkg_postinst() {
                elog "have additional dependencies not covered by this ebuild, 
for example"
                elog "view_in_mpv needs media-video/mpv[lua] and 
net-misc/yt-dlp."
        fi
+
+       if [[ -v QUTEBROWSER_HAD_QT6 ]]; then
+               ewarn "This is a downgrade from Qt6-based ${PN} to Qt5-based, 
and this"
+               ewarn "older version of ${PN} will /not/ warn on startup that 
this is"
+               ewarn "going to destroy some browsing data (e.g. cookies) when 
older chromium"
+               ewarn "version tries to use the newer 
~/.local/share/${PN}/webengine."
+               ewarn
+               ewarn "It is recommended to backup in case or go back to Qt6."
+       fi
 }

Reply via email to