commit: d7318bdc9ad2d2991baa0a5a3037dd0e1ca9fcf9 Author: Sv. Lockal <lockalsash <AT> gmail <DOT> com> AuthorDate: Sat Jan 10 16:23:21 2026 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sun Jan 11 09:16:58 2026 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d7318bdc
cmake.eclass: fix removal of FindBLAS.cmake during cmake-4.2.1 upgrade Change done in 3f8ff6b53f4c9d048cb677b0e41a4f5089951d5d had a logic mistake. Original logic was: if CMAKE_REMOVE_MODULES_LIST is not empty, then validate that it is array. Otherwise (emty string or unset), set it to remove FindBLAS.cmake and FindLAPACK.cmake. After change if effectively always set any non-empty CMAKE_REMOVE_MODULES_LIST array to ( FindBLAS FindLAPACK ), if <dev-build/cmake-4.2.1 is installed. In the result, upgrade from cmake-4.1.2 to cmake-4.2.1 resulted in removed FindBLAS.cmake and FindLAPACK.cmake. What should be done instead is just checking that CMAKE_REMOVE_MODULES_LIST is not an array. 1) Explicitly empty array - no need to remove FindBLAS/FindLAPACK 2) Unset and <dev-build/cmake-4.2.1 - remove them. This change is followed by cmake-4.2.1 revbump, because existing upgraded installations may lack FindBLAS.cmake and FindLAPACK.cmake. Bug: https://bugs.gentoo.org/968511 Signed-off-by: Sv. Lockal <lockalsash <AT> gmail.com> Part-of: https://github.com/gentoo/gentoo/pull/45321 Signed-off-by: Sam James <sam <AT> gentoo.org> eclass/cmake.eclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eclass/cmake.eclass b/eclass/cmake.eclass index 03c54866f2e8..643370f53536 100644 --- a/eclass/cmake.eclass +++ b/eclass/cmake.eclass @@ -493,7 +493,7 @@ cmake_prepare() { die "FATAL: Unable to find CMakeLists.txt" fi - if ! [[ ${CMAKE_REMOVE_MODULES_LIST@a} == *a* && ${#CMAKE_REMOVE_MODULES_LIST[@]} -eq 0 ]]; then + if [[ ${CMAKE_REMOVE_MODULES_LIST@a} != *a* ]]; then if has_version -b "<dev-build/cmake-4.2.1"; then CMAKE_REMOVE_MODULES_LIST=( FindBLAS FindLAPACK ) fi
