build: fix binpkg hostdeps again

Followup on 357eccc6 (build: fix checking if bin pkg host deps
installed, 2025-07-13) keep a count of already installed host deps, and
when the host deps count is equal to it rather than zero, break out of
the loop. This fixes the infinite loop and hang caused by host deps
being required but already being installed.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
Rafael Kitover 2025-07-13 16:17:48 +00:00
parent 357eccc6eb
commit f8c52377a3
No known key found for this signature in database
GPG Key ID: 08AB596679D86240
1 changed files with 7 additions and 1 deletions

View File

@ -318,6 +318,8 @@ function(get_binary_packages vcpkg_exe)
endif()
endforeach()
set(installed_host_dep_count 0)
while(TRUE)
# -command "import-module ($env:USERPROFILE + '/source/repos/vcpkg-binpkg-prototype/vcpkg-binpkg.psm1'); vcpkg-listmissing ."
execute_process(
@ -336,7 +338,9 @@ function(get_binary_packages vcpkg_exe)
string(REGEX REPLACE "\r?\n" ";" host_deps "${host_deps}")
if(NOT host_deps)
list(LENGTH host_deps host_deps_count)
if(host_deps_count EQUAL installed_host_dep_count)
break()
endif()
@ -370,6 +374,8 @@ function(get_binary_packages vcpkg_exe)
message(STATUS "Failed to download host dependency package '${pkg}', aborting.")
return()
endif()
else()
math(EXPR installed_host_dep_count "${installed_host_dep_count} + 1")
endif()
endforeach()
endwhile()