mirror of
git://code.qt.io/qt/qt5.git
synced 2026-02-01 19:36:04 +08:00
Don't manually rerun conan Run-Conan-Install
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>
This commit is contained in:
committed by
Konstantin Tokarev
parent
08b99e8def
commit
fb0af46c48
@@ -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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user