commit:     237a6dc1648ba32c6d8ee12ae33d610aa912b6b0
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Tue Mar  3 04:36:38 2026 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Tue Mar  3 07:02:55 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=237a6dc1

www-client/chromium: add profile dir warning for non-stable channels

Users of beta and dev who migrate from non-slotted Chromium will now
receive a postinst ewarn informing them that the profile directory has
changed.

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 www-client/chromium/chromium-146.0.7680.31-r1.ebuild | 20 +++++++++++++++++++-
 www-client/chromium/chromium-147.0.7703.0.ebuild     | 20 +++++++++++++++++++-
 2 files changed, 38 insertions(+), 2 deletions(-)

diff --git a/www-client/chromium/chromium-146.0.7680.31-r1.ebuild 
b/www-client/chromium/chromium-146.0.7680.31-r1.ebuild
index 4897ca636961..73abc9147bfd 100644
--- a/www-client/chromium/chromium-146.0.7680.31-r1.ebuild
+++ b/www-client/chromium/chromium-146.0.7680.31-r1.ebuild
@@ -1637,7 +1637,7 @@ pkg_postinst() {
        xdg_desktop_database_update
        readme.gentoo_print_elog
 
-       if ! use headless; then
+       if use !headless && [[ -z "${REPLACING_VERSIONS}" ]]; then
                if use vaapi; then
                        elog "Hardware-accelerated video decoding 
configuration:"
                        elog
@@ -1693,4 +1693,22 @@ pkg_postinst() {
                ewarn "Chromium is known to behave unpredictably with this 
system configuration;"
                ewarn "please complete the configuration of this system before 
logging any bugs."
        fi
+
+       # Stable slot doesn't change profile directory, and it's vanishingly 
unlikely that users will downgrade from dev.
+       if [[ ${SLOT} != "stable" && -n "${REPLACING_VERSIONS}" ]]; then
+               local replacing_non_slotted=false
+               # there could be more than one PVR
+               for version in ${REPLACING_VERSIONS}; do
+                       if ver_test "${version}" -le "145.0.7632.116"; then
+                               replacing_non_slotted=true
+                               break
+                       fi
+               done
+               if ${replacing_non_slotted}; then
+                       ewarn "This version of Chromium has replaced a 
non-slotted ebuild."
+                       ewarn "This channel has its own profile directory, so 
your existing profile will not be used."
+                       ewarn "To use your existing profile, either copy or 
move it to the new location."
+                       ewarn "See 
https://wiki.gentoo.org/wiki/Chromium#Profile_Directories for more information."
+               fi
+       fi
 }

diff --git a/www-client/chromium/chromium-147.0.7703.0.ebuild 
b/www-client/chromium/chromium-147.0.7703.0.ebuild
index 54d78555f4d5..c7a11635b51d 100644
--- a/www-client/chromium/chromium-147.0.7703.0.ebuild
+++ b/www-client/chromium/chromium-147.0.7703.0.ebuild
@@ -1635,7 +1635,7 @@ pkg_postinst() {
        xdg_desktop_database_update
        readme.gentoo_print_elog
 
-       if ! use headless; then
+       if use !headless && [[ -z "${REPLACING_VERSIONS}" ]]; then
                if use vaapi; then
                        elog "Hardware-accelerated video decoding 
configuration:"
                        elog
@@ -1691,4 +1691,22 @@ pkg_postinst() {
                ewarn "Chromium is known to behave unpredictably with this 
system configuration;"
                ewarn "please complete the configuration of this system before 
logging any bugs."
        fi
+
+       # Stable slot doesn't change profile directory, and it's vanishingly 
unlikely that users will downgrade from dev.
+       if [[ ${SLOT} != "stable" && -n "${REPLACING_VERSIONS}" ]]; then
+               local replacing_non_slotted=false
+               # there could be more than one PVR
+               for version in ${REPLACING_VERSIONS}; do
+                       if ver_test "${version}" -le "145.0.7632.116"; then
+                               replacing_non_slotted=true
+                               break
+                       fi
+               done
+               if ${replacing_non_slotted}; then
+                       ewarn "This version of Chromium has replaced a 
non-slotted ebuild."
+                       ewarn "This channel has its own profile directory, so 
your existing profile will not be used."
+                       ewarn "To use your existing profile, either copy or 
move it to the new location."
+                       ewarn "See 
https://wiki.gentoo.org/wiki/Chromium#Profile_Directories for more information."
+               fi
+       fi
 }

Reply via email to