Provisioning: Use Remove function when removing items in Windows

Sometimes items are locked by some windows process so that they can't be
removed. This will fail provisioning instantly.

Let's give the removing process more time by retrying if it will fail
on first attempt

Change-Id: Ic5c16c0d920ed0625d0c6830323d0bc6ba2cd608
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
This commit is contained in:
Heikki Halmet
2019-11-19 10:13:21 +02:00
parent ed8cddd726
commit 4a37ec2dd5
33 changed files with 43 additions and 43 deletions

View File

@@ -82,8 +82,7 @@ while ($stop -ne $true)
# We need to change allowZip64 from 'False' to 'True' to be able to create ZIP files that use the ZIP64 extensions when the zipfile is larger than 2 GB
Write-Host "Changing allowZip64 value to 'True'..."
(Get-Content $targetDir\lib\zipfile.py) | ForEach-Object { $_ -replace "allowZip64=False", "allowZip64=True" } | Set-Content $targetDir\lib\zipfile.py
Write-Host "Remove $package..."
Remove-Item -Path $package
Remove "$package"
# When installing 32 bit python to 64 bit host, we want to keep only default python in path
# For cross-compilation we export some helper env variable