commit: 4f9777574be1a56128e802da06df7458165c2f47 Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org> AuthorDate: Tue Jul 27 20:26:23 2021 +0000 Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org> CommitDate: Tue Jul 27 20:27:45 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4f977757
sys-libs/glibc: Add workaround for the missing crypt.h problem Bug: https://bugs.gentoo.org/802210 Package-Manager: Portage-3.0.20, Repoman-3.0.3 Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org> sys-libs/glibc/glibc-2.33-r5.ebuild | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys-libs/glibc/glibc-2.33-r5.ebuild b/sys-libs/glibc/glibc-2.33-r5.ebuild index 92983b53656..8c7ab1e3d32 100644 --- a/sys-libs/glibc/glibc-2.33-r5.ebuild +++ b/sys-libs/glibc/glibc-2.33-r5.ebuild @@ -1502,9 +1502,10 @@ pkg_preinst() { # Keep around libcrypt so that Perl doesn't break when merging libxcrypt # (libxcrypt is the new provider for now of libcrypt.so.{1,2}). # bug #802207 - if has_version "${CATEGORY}/${PN}[crypt]"; then + if ! use crypt && has_version "${CATEGORY}/${PN}[crypt]"; then PRESERVED_OLD_LIBCRYPT=1 preserve_old_lib /$(get_libdir)/libcrypt$(get_libname 1) + cp "${EROOT}"/usr/include/crypt.h "${T}"/crypt.h || die else PRESERVED_OLD_LIBCRYPT=0 fi @@ -1540,5 +1541,10 @@ pkg_postinst() { if [[ ${PRESERVED_OLD_LIBCRYPT} -eq 1 ]] ; then preserve_old_lib_notify /$(get_libdir)/libcrypt$(get_libname 1) + cp "${T}"/crypt.h "${EROOT}"/usr/include/crypt.h || eerror "Error restoring crypt.h, please file a bug" + elog "Please ignore a possible later error message about a file collision involving" + elog "/usr/include/crypt.h. We need to preserve this file for the moment to keep" + elog "the upgrade working, but it also needs to be overwritten when" + elog "sys-libs/libxcrypt is installed. See bug 802210 for more details." fi }
