summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-12-09 05:57:30 +0000
committerSam James <sam@gentoo.org>2021-12-09 05:57:30 +0000
commit1aa54cb91cfc6da9f151abaa49f045ea291189f4 (patch)
treedc3209ff00242ae4df057c813de016440f73d206
parentprofiles/arch/powerpc/ppc32: drop obsolete webkit-gtk related masks (diff)
downloadgentoo-1aa54cb91cfc6da9f151abaa49f045ea291189f4.tar.gz
gentoo-1aa54cb91cfc6da9f151abaa49f045ea291189f4.tar.bz2
gentoo-1aa54cb91cfc6da9f151abaa49f045ea291189f4.zip
sys-libs/glibc: re-sync 2.34-r3/9999 for warning-on-upgrade
Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--sys-libs/glibc/glibc-2.34-r3.ebuild21
-rw-r--r--sys-libs/glibc/glibc-9999.ebuild21
2 files changed, 32 insertions, 10 deletions
diff --git a/sys-libs/glibc/glibc-2.34-r3.ebuild b/sys-libs/glibc/glibc-2.34-r3.ebuild
index 7053b85282f1..b65194c38f6f 100644
--- a/sys-libs/glibc/glibc-2.34-r3.ebuild
+++ b/sys-libs/glibc/glibc-2.34-r3.ebuild
@@ -730,6 +730,20 @@ sanity_prechecks() {
fi
}
+upgrade_warning() {
+ if [[ ${MERGE_TYPE} != buildonly && -n ${REPLACING_VERSIONS} && -z ${ROOT} ]]; then
+ local oldv newv=$(ver_cut 1-2 ${PV})
+ for oldv in ${REPLACING_VERSIONS}; do
+ if ver_test ${oldv} -lt ${newv}; then
+ ewarn "After upgrading glibc, please restart all running processes."
+ ewarn "Be sure to include init (telinit u) or systemd (systemctl daemon-reexec)."
+ ewarn "Alternatively, reboot your system."
+ break
+ fi
+ done
+ fi
+}
+
#
# the phases
#
@@ -740,6 +754,7 @@ pkg_pretend() {
# All the checks...
einfo "Checking general environment sanity."
sanity_prechecks
+ upgrade_warning
}
pkg_setup() {
@@ -1558,11 +1573,7 @@ pkg_postinst() {
use compile-locales || run_locale_gen "${EROOT}/"
fi
- if systemd_is_booted && [[ -z ${ROOT} ]] ; then
- # We need to restart systemd when upgrading from < 2.34
- # bug #823756
- systemctl daemon-reexec
- fi
+ upgrade_warning
# Check for sanity of /etc/nsswitch.conf, take 2
if [[ -e ${EROOT}/etc/nsswitch.conf ]] && ! has_version sys-auth/libnss-nis ; then
diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild
index ea87ec9994c8..22f47562ff94 100644
--- a/sys-libs/glibc/glibc-9999.ebuild
+++ b/sys-libs/glibc/glibc-9999.ebuild
@@ -813,6 +813,20 @@ sanity_prechecks() {
fi
}
+upgrade_warning() {
+ if [[ ${MERGE_TYPE} != buildonly && -n ${REPLACING_VERSIONS} && -z ${ROOT} ]]; then
+ local oldv newv=$(ver_cut 1-2 ${PV})
+ for oldv in ${REPLACING_VERSIONS}; do
+ if ver_test ${oldv} -lt ${newv}; then
+ ewarn "After upgrading glibc, please restart all running processes."
+ ewarn "Be sure to include init (telinit u) or systemd (systemctl daemon-reexec)."
+ ewarn "Alternatively, reboot your system."
+ break
+ fi
+ done
+ fi
+}
+
#
# the phases
#
@@ -823,6 +837,7 @@ pkg_pretend() {
# All the checks...
einfo "Checking general environment sanity."
sanity_prechecks
+ upgrade_warning
}
pkg_setup() {
@@ -1590,11 +1605,7 @@ pkg_postinst() {
use compile-locales || run_locale_gen "${EROOT}/"
fi
- if systemd_is_booted && [[ -z ${ROOT} ]] ; then
- # We need to restart systemd when upgrading from < 2.34
- # bug #823756
- systemctl daemon-reexec
- fi
+ upgrade_warning
# Check for sanity of /etc/nsswitch.conf, take 2
if [[ -e ${EROOT}/etc/nsswitch.conf ]] && ! has_version sys-auth/libnss-nis ; then