commit: 2b03957f90dc4c5ae3df044aaacbe95143b4591d Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Sat Dec 14 17:32:36 2024 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sat Dec 14 17:33:41 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2b03957f
dev-build/cmake: add warning on bad /etc/*-release files Prompted by (yet another) post on this, see https://forums.gentoo.org/viewtopic-t-1170229.html. Bug: https://bugs.gentoo.org/599684 Bug: https://bugs.gentoo.org/753581 Signed-off-by: Sam James <sam <AT> gentoo.org> dev-build/cmake/cmake-3.31.2.ebuild | 11 +++++++++++ dev-build/cmake/cmake-9999.ebuild | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/dev-build/cmake/cmake-3.31.2.ebuild b/dev-build/cmake/cmake-3.31.2.ebuild index e9982cd799b4..77333d9623b1 100644 --- a/dev-build/cmake/cmake-3.31.2.ebuild +++ b/dev-build/cmake/cmake-3.31.2.ebuild @@ -277,6 +277,17 @@ src_install() { } pkg_postinst() { + if [[ -z ${EPREFIX} ]] ; then + local file + # See bug #599684 and bug #753581 (at least) + for file in /etc/arch-release /etc/redhat-release /etc/debian_version ; do + eerror "Errant ${file} found!" + eerror "The presence of these files is known to confuse CMake's" + eerror "library path logic. Please (re)move this file:" + eerror " mv ${file} ${file}.bak" + done + fi + if use gui; then xdg_icon_cache_update xdg_desktop_database_update diff --git a/dev-build/cmake/cmake-9999.ebuild b/dev-build/cmake/cmake-9999.ebuild index 57684e5cd229..214e75342d3c 100644 --- a/dev-build/cmake/cmake-9999.ebuild +++ b/dev-build/cmake/cmake-9999.ebuild @@ -278,6 +278,17 @@ src_install() { } pkg_postinst() { + if [[ -z ${EPREFIX} ]] ; then + local file + # See bug #599684 and bug #753581 (at least) + for file in /etc/arch-release /etc/redhat-release /etc/debian_version ; do + eerror "Errant ${file} found!" + eerror "The presence of these files is known to confuse CMake's" + eerror "library path logic. Please (re)move this file:" + eerror " mv ${file} ${file}.bak" + done + fi + if use gui; then xdg_icon_cache_update xdg_desktop_database_update
