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@gentoo.org>
This commit is contained in:
Sam James
2024-12-14 17:32:36 +00:00
parent 1071fda1d7
commit 2b03957f90
2 changed files with 22 additions and 0 deletions

View File

@@ -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

View File

@@ -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