win: try killing remaining processes using powershell (ps fails)

This commit is contained in:
Eric Le Lay 2020-11-22 17:00:16 +01:00
parent 53ed491bf0
commit 737df5a734

View file

@ -20,8 +20,13 @@ build_script:
- curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig
- bash -lc "pacman-key --verify msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig"
- bash -lc "pacman --noconfirm -U msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz"
- bash -lc "pacman -Syuu --noconfirm && ps -ef | grep 'dirmngr' | grep -v grep | awk '{print `$2}' | xargs -r kill -9 && ps -ef | grep 'gpg-agent' | grep -v grep | awk '{print `$2}' | xargs -r kill -9"
- bash -lc "pacman -Syuu --noconfirm && ps -ef | grep 'gpg-agent' | grep -v grep | awk '{print `$2}' | xargs -r kill -9"
# workaround updating msys2-runtime breaks all programs until last one exited
- bash -lc "pacman -Syuu --noconfirm"
- Powershell.exe "Stop-Process -name dirmngr -Erroraction silentlycontinue"
- Powershell.exe "Stop-Process -name gpg-agent -Erroraction silentlycontinue"
- bash -lc "pacman -Syuu --noconfirm"
- Powershell.exe "Stop-Process -name dirmngr -Erroraction silentlycontinue"
- Powershell.exe "Stop-Process -name gpg-agent -Erroraction silentlycontinue"
# remove precisely conflicting packages
- bash -lc "pacman --noconfirm --ask 20 --remove mingw-w64-x86_64-gcc-ada mingw-w64-x86_64-gcc-objc mingw-w64-i686-gcc-ada mingw-w64-i686-gcc-objc"
# rerun per the "terminate MSYS2 without returning to shell and check for updates again" message