Skip to content

Commit 5eb23de

Browse files
committed
[vcpkg] Qemu: try to fix CI pacman hang
Signed-off-by: Mustafa Kemal Gilor <mustafa.gilor@canonical.com>
1 parent 4bf77d6 commit 5eb23de

1 file changed

Lines changed: 5 additions & 11 deletions

File tree

3rd-party/vcpkg-ports/qemu/portfile.cmake

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -142,24 +142,18 @@ if(VCPKG_TARGET_IS_WINDOWS)
142142
to_msys_path("${BUILD_DIR}" BUILD_DIR_UNIX)
143143
list(JOIN QEMU_COMMON_OPTIONS " " COMMON_OPTIONS_STRING)
144144

145-
if(NOT EXISTS "${MSYS2_SETUP_STAMP}")
145+
if(NOT EXISTS "${MSYS2_SETUP_STAMP}")
146+
# Initial shell launch to let MSYS2 set up its environment
146147
vcpkg_execute_required_process(
147-
COMMAND ${MINGW_SHELL} "pacman-key --init && pacman-key --populate msys2 && pacman -Sy --noconfirm"
148+
COMMAND ${MINGW_SHELL} "true"
148149
WORKING_DIRECTORY "${MSYS2_DIR}"
149-
LOGNAME msys2-sync-${TARGET_TRIPLET}
150+
LOGNAME msys2-init-${TARGET_TRIPLET}
150151
)
151152
vcpkg_execute_required_process(
152-
COMMAND ${MINGW_SHELL} "pacman -Rdd --noconfirm mingw-w64-x86_64-pkg-config || true"
153-
WORKING_DIRECTORY "${MSYS2_DIR}"
154-
LOGNAME msys2-remove-pkgconfig-${TARGET_TRIPLET}
155-
)
156-
vcpkg_execute_required_process(
157-
COMMAND ${MINGW_SHELL} "pacman -S --noconfirm --needed --ask 4 ${MINGW_PACKAGES_STRING}"
153+
COMMAND ${MINGW_SHELL} "pacman -Rdd --noconfirm mingw-w64-x86_64-pkg-config || true && pacman -Sy --noconfirm && pacman -S --noconfirm --needed ${MINGW_PACKAGES_STRING}"
158154
WORKING_DIRECTORY "${MSYS2_DIR}"
159155
LOGNAME msys2-packages-${TARGET_TRIPLET}
160156
)
161-
# QEMU's mkvenv needs distlib and bundled wheels; MSYS2's Python ships
162-
# with PEP 668 restrictions, so remove the marker and bootstrap pip.
163157
vcpkg_execute_required_process(
164158
COMMAND ${MINGW_SHELL} "${MINGW_ENV} && rm -f /mingw64/lib/python3.*/EXTERNALLY-MANAGED && python -m ensurepip && python -m pip install distlib '${SOURCE_PATH_UNIX}'/python/wheels/*.whl"
165159
WORKING_DIRECTORY "${MSYS2_DIR}"

0 commit comments

Comments
 (0)