summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMÃ¥rten Nordheim <marten.nordheim@qt.io>2020-03-05 13:19:10 +0100
committerKonstantin Tokarev <annulen@yandex.ru>2020-04-15 09:53:44 +0300
commit176d9ce09c8abcc232a4bd5ebc2ac6d6413113af (patch)
treeee8572c40cf495555b95ee96d72224d1a0c24a35
parent08b99e8def4db7e768cb9dcc456e25852081cf5d (diff)
Don't manually rerun conan Run-Conan-Installv5.15.0-beta4
Modern conan will retry downloads on its own. Change default number of attempts to 5 for more reliability. Change-Id: Iafd4845b31c3e5fb296ba0b897cbf2030c412b04 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
-rw-r--r--coin/provisioning/common/windows/conan.ps123
1 files changed, 8 insertions, 15 deletions
diff --git a/coin/provisioning/common/windows/conan.ps1 b/coin/provisioning/common/windows/conan.ps1
index c5984e26..e7e0de22 100644
--- a/coin/provisioning/common/windows/conan.ps1
+++ b/coin/provisioning/common/windows/conan.ps1
@@ -77,27 +77,20 @@ function Run-Conan-Install
$manifestsDir = "$PSScriptRoot\conan_manifests"
$buildinfoRoot = "C:\Utils\conanbuildinfos"
+ # Make up to 5 attempts for all download operations in conan
+ $env:CONAN_RETRY = "5"
+
Get-ChildItem -Path "$ConanfilesDir\*.txt" |
ForEach-Object {
$conanfile = $_.FullName
$outpwd = "$buildinfoRoot\$BuildinfoDir\$($_.BaseName)"
New-Item $outpwd -Type directory -Force | Out-Null
- for ($i = 1; $i -le 5; $i++) {
- try {
- Push-Location $outpwd
- Run-Executable "$scriptsPath\conan.exe" "install --no-imports --verify $manifestsDir", `
- '-s', ('compiler="' + $Compiler + '"'), `
- "-s os=Windows -s arch=$Arch -s compiler.version=$CompilerVersion $extraArgs $conanfile"
- break;
- } catch {
- if ($i -eq 5) {
- throw "Could not install conan content"
- }
- } finally {
- Pop-Location
- }
- }
+ Push-Location $outpwd
+ Run-Executable "$scriptsPath\conan.exe" "install --no-imports --verify $manifestsDir", `
+ '-s', ('compiler="' + $Compiler + '"'), `
+ "-s os=Windows -s arch=$Arch -s compiler.version=$CompilerVersion $extraArgs $conanfile"
+ Pop-Location
Copy-Item -Path $conanfile -Destination "$outpwd\conanfile.txt"
}