diff options
author | Heikki Halmet <heikki.halmet@qt.io> | 2020-04-28 14:53:47 +0300 |
---|---|---|
committer | Heikki Halmet <heikki.halmet@qt.io> | 2020-05-04 14:42:03 +0300 |
commit | 8f653ce4f81887e574241823caf6065ec67a13b6 (patch) | |
tree | 777e3b37766de404ff217e861281128bc352afd4 | |
parent | 71043ca2438d49c1f9aa64b56cfd453dac384696 (diff) |
Provisioning: Add sleep before killing gpg-agent in msys installation
Task-number: QTQAINFRA-3691
Change-Id: If84fd2d0d1cd6dccadf21cbf688aca6182cdd920
(cherry picked from commit 5f03b84e6542f00cf9eccd1d8820f423cee5e2b9)
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
-rw-r--r-- | coin/provisioning/common/windows/install-msys2.ps1 | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/coin/provisioning/common/windows/install-msys2.ps1 b/coin/provisioning/common/windows/install-msys2.ps1 index b26df151..784b09dc 100644 --- a/coin/provisioning/common/windows/install-msys2.ps1 +++ b/coin/provisioning/common/windows/install-msys2.ps1 @@ -66,6 +66,9 @@ cmd /c "$msys `"-l`" `"-c`" `"rm -rf /etc/pacman.d/gnupg;pacman-key --init;pacma Start-Sleep -s 30 cmd /c "$msys `"-l`" `"-c`" `"cpan -i Text::Template Test::More`"" +# Sometimes gpg-agent won't get killed after the installation process. If that happens the provisioning will won't continue and it will hang until timeout. So we need make sure it will be killed. +# Let's sleep for awhile and wait that msys installation is finished. Otherwise the installation might start up gpg-agent or dirmngr after the script has passed the killing process. +Start-Sleep -s 180 if (Get-Process -Name "gpg-agent" -ErrorAction SilentlyContinue) { Stop-Process -Force -Name gpg-agent } if (Get-Process -Name "dirmngr" -ErrorAction SilentlyContinue) { Stop-Process -Force -Name dirmngr } |