Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions scripts/cmake/vcpkg_acquire_msys.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function(vcpkg_acquire_msys PATH_TO_ROOT_OUT)
WORKING_DIRECTORY ${TOOLPATH}
)
_execute_process(
COMMAND ${PATH_TO_ROOT}/usr/bin/bash.exe --noprofile --norc -c "PATH=/usr/bin;pacman -Syu --noconfirm"
COMMAND ${PATH_TO_ROOT}/usr/bin/bash.exe --noprofile --norc -c "PATH=/usr/bin;pacman -Syuu --noconfirm --disable-download-timeout --overwrite '*'"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's -Syuu? I couldn't find mention on pacman's manpage.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-Syuu - full update

although I don't know how the "CI" will behave, a BASH reload may be required

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a timeout to _execute_process, and just set it to like... I dunno, an hour or something?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not required, with a full update can update itself BASH, pacman

When the bash is running, you get a message that you need to restart it to successfully upgrade

or you're about another?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean, we don't want to just not timeout if there's an infinite loop somewhere.

Copy link
Contributor Author

@MVoz MVoz May 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unfortunately i cannot edit
add

_execute_process(
  COMMAND ${PATH_TO_ROOT}/usr/bin/bash.exe --noprofile --norc -c "PATH=/usr/bin;pacman -Syuu --noconfirm --disable-download-timeout --overwrite '*'"
  WORKING_DIRECTORY ${TOOLPATH}
)
    _execute_process(
      COMMAND ${CMAKE_COMMAND} -E sleep 3600#sec.
    )
file(WRITE "${TOOLPATH}/${STAMP}" "0")

or

function(sleep delay)
  execute_process(
    COMMAND ${CMAKE_COMMAND} -E sleep ${delay}
    RESULT_VARIABLE result
    )
  if(NOT result EQUAL 0)
    message(FATAL_ERROR "failed to sleep for ${delay} second.")
  endif()
endfunction(sleep)

sleep(3600)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean you can do:

_execute_process(
    COMMAND ${PATH_TO_ROOT}/usr/bin/bash.exe --noprofile --norc -c "PATH=/usr/bin;pacman -Syuu --noconfirm --disable-download-timeout --overwrite '*'"
    TIMEOUT 3600
)

Copy link
Contributor Author

@MVoz MVoz May 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/appveyor/build-images/blob/350e44f7a27e95859ac8e55bbf0e7f872153c7fa/scripts/Windows/install_msys64.ps1#L33

tested, works locally, not on the VMSS (cannot remove /usr/bin/pacman.exe (Permission denied))
errors associated with junction/symlink and access rights
close

WORKING_DIRECTORY ${TOOLPATH}
)
file(WRITE "${TOOLPATH}/${STAMP}" "0")
Expand All @@ -107,7 +107,7 @@ function(vcpkg_acquire_msys PATH_TO_ROOT_OUT)
set(ENV{PATH} ${PATH_TO_ROOT}/usr/bin)
vcpkg_execute_required_process(
ALLOW_IN_DOWNLOAD_MODE
COMMAND ${PATH_TO_ROOT}/usr/bin/bash.exe --noprofile --norc -c "pacman -Sy --noconfirm --needed ${_am_PACKAGES}"
COMMAND ${PATH_TO_ROOT}/usr/bin/bash.exe --noprofile --norc -c "pacman -Sy --noconfirm --needed --disable-download-timeout --overwrite '*' ${_am_PACKAGES}"
WORKING_DIRECTORY ${TOOLPATH}
LOGNAME msys-pacman-${TARGET_TRIPLET}
)
Expand Down