summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2021-11-23 13:37:56 -0500
committerSam James <sam@gentoo.org>2021-12-01 14:52:45 +0000
commit30fe8b89aef9f0701f6dcd935421b8ed5da614cc (patch)
tree4d7f20d6bd7760a4df678f31657ee1db61e85ec5 /sys-libs
parentnet-im/discord-bin: reference other glibc bug in comment too (diff)
downloadgentoo-30fe8b89aef9f0701f6dcd935421b8ed5da614cc.tar.gz
gentoo-30fe8b89aef9f0701f6dcd935421b8ed5da614cc.tar.bz2
gentoo-30fe8b89aef9f0701f6dcd935421b8ed5da614cc.zip
sys-libs/glibc: replace systemd reexec with a warning
Signed-off-by: Mike Gilbert <floppym@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/22960 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/glibc/glibc-2.34-r2.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-r2.ebuild b/sys-libs/glibc/glibc-2.34-r2.ebuild
index 04479ab604b7..dd50e8578a35 100644
--- a/sys-libs/glibc/glibc-2.34-r2.ebuild
+++ b/sys-libs/glibc/glibc-2.34-r2.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() {
@@ -1547,11 +1562,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 72cca561f703..79318fb53543 100644
--- a/sys-libs/glibc/glibc-9999.ebuild
+++ b/sys-libs/glibc/glibc-9999.ebuild
@@ -723,6 +723,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
#
@@ -733,6 +747,7 @@ pkg_pretend() {
# All the checks...
einfo "Checking general environment sanity."
sanity_prechecks
+ upgrade_warning
}
pkg_setup() {
@@ -1540,11 +1555,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