From 291197817633fc083692f6da0648d5284cdcab58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20Petter=20Sk=C3=A5lerud?= Date: Tue, 3 Mar 2026 15:14:43 +0100 Subject: [PATCH] Windows, FFmpeg: Handle exception when downloading patchelf The script 'install-ffmpeg.ps1' contains logic for building all targets even if some targets fail, and then report all results at the end. When building Android specifically, we download patchelf sources from CI, it's possible for it to throw an exception if CI-files is not available. This breaks the logic and makes us terminate early. This patch encloses the Invoke-WebRequest in a try-catch. This also makes it easier to run this script locally. Pick-to: 6.11 6.8 Change-Id: I93d4ec905c61dc7b44b87100353353f24c27d276 Reviewed-by: Artem Dyomin --- .../provisioning/common/windows/install-ffmpeg.ps1 | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/coin/provisioning/common/windows/install-ffmpeg.ps1 b/coin/provisioning/common/windows/install-ffmpeg.ps1 index 79c25e22..ac749879 100644 --- a/coin/provisioning/common/windows/install-ffmpeg.ps1 +++ b/coin/provisioning/common/windows/install-ffmpeg.ps1 @@ -271,10 +271,16 @@ function InstallAndroidArmv7 { $patchelf_sources = "https://ci-files01-hki.ci.qt.io/input/android/patchelf/0.17.2.tar.gz" $patchelf_download_location = "C:\Windows\Temp\0.17.2.tar.gz" - Invoke-WebRequest -UseBasicParsing $patchelf_sources -OutFile $patchelf_download_location - Verify-Checksum $patchelf_download_location $patchelf_sha1 - Extract-tar_gz $patchelf_download_location $unzip_location - Remove $patchelf_download_location + try { + Invoke-WebRequest -UseBasicParsing $patchelf_sources -OutFile $patchelf_download_location + Verify-Checksum $patchelf_download_location $patchelf_sha1 + Extract-tar_gz $patchelf_download_location $unzip_location + Remove $patchelf_download_location + } catch { + Write-Host "Error grabbing sources when installing patchelf:" + Write-Host $_ + return $false + } Start-Process -NoNewWindow -Wait -PassThru -ErrorAction Stop -FilePath $msys -ArgumentList ("-lc", "`"cd C:/patchelf-0.17.2 && ./bootstrap.sh && ./configure && make install`"")