"Sv. Lockal" <[email protected]> writes:

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

Note: the patch on the ML seems mangled (line-wrapped). I recommend
using git-send-email in future.

Thanks a lot for the investigation and fix. Will push now.

>
> Bug: https://bugs.gentoo.org/968511
> Part-of: https://github.com/gentoo/gentoo/pull/45321
> Signed-off-by: Sv. Lockal <[email protected]>
> ---
>  eclass/cmake.eclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/eclass/cmake.eclass b/eclass/cmake.eclass
> index 03c54866f2e86..643370f535360 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

Attachment: signature.asc
Description: PGP signature

Reply via email to