commit:     e1c394c177c08679b430b78c3dbf7611768ca983
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 14 23:05:33 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Nov 14 23:05:33 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e1c394c1

sys-libs/glibc: restart systemd in pkg_postinst

Closes: https://bugs.gentoo.org/823756
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-libs/glibc/{glibc-2.34-r1.ebuild => glibc-2.34-r2.ebuild} | 6 ++++++
 sys-libs/glibc/glibc-9999.ebuild                              | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/sys-libs/glibc/glibc-2.34-r1.ebuild 
b/sys-libs/glibc/glibc-2.34-r2.ebuild
similarity index 99%
rename from sys-libs/glibc/glibc-2.34-r1.ebuild
rename to sys-libs/glibc/glibc-2.34-r2.ebuild
index 790afee5b335..851820e3c05e 100644
--- a/sys-libs/glibc/glibc-2.34-r1.ebuild
+++ b/sys-libs/glibc/glibc-2.34-r2.ebuild
@@ -1539,6 +1539,12 @@ 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
+
        # Check for sanity of /etc/nsswitch.conf, take 2
        if [[ -e ${EROOT}/etc/nsswitch.conf ]] && ! has_version 
sys-auth/libnss-nis ; then
                local entry

diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild
index ce5ad8d3c43d..d62fe8108de1 100644
--- a/sys-libs/glibc/glibc-9999.ebuild
+++ b/sys-libs/glibc/glibc-9999.ebuild
@@ -1540,6 +1540,12 @@ 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
+
        # Check for sanity of /etc/nsswitch.conf, take 2
        if [[ -e ${EROOT}/etc/nsswitch.conf ]] && ! has_version 
sys-auth/libnss-nis ; then
                local entry

Reply via email to