Skip to content

[msys2 add] disable-download-timeout & overwrite#10782

Closed
MVoz wants to merge 1 commit intomicrosoft:masterfrom
MVoz:disable-download-timeout--overwrite
Closed

[msys2 add] disable-download-timeout & overwrite#10782
MVoz wants to merge 1 commit intomicrosoft:masterfrom
MVoz:disable-download-timeout--overwrite

Conversation

@MVoz
Copy link
Contributor

@MVoz MVoz commented Apr 11, 2020

+add full update dist

@PhoebeHui
Copy link
Contributor

@strega-nil, could you help futhre review?

)
_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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants