From 61f9194880de9c5f29c569e385f4957d84b2b269 Mon Sep 17 00:00:00 2001 From: cproudlock Date: Sun, 18 Oct 2026 10:00:43 -0400 Subject: [PATCH] Upload-Image: do not send MCL's boot.json and hw_drivers.json catalogs PESetup reads HardwareDriver.json (the selection), never these two, and the webapp treats a missing hw_drivers.json as empty. The work PC's policy blocks both on the way to a non-GE share (they arrive as 0 bytes), so sending them would fail verification on every round. --- scripts/Upload-Image.ps1 | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/scripts/Upload-Image.ps1 b/scripts/Upload-Image.ps1 index 537ecf2..7c1451c 100644 --- a/scripts/Upload-Image.ps1 +++ b/scripts/Upload-Image.ps1 @@ -54,6 +54,10 @@ if (-not $Pass) { } $ApiBase = "http://${Server}:$WebPort" $ExcludedDeployDirs = @("Operating Systems", "Out-of-box Drivers", "Packages") +# MCL's own catalogs, not read by PESetup (it reads HardwareDriver.json, the +# selection) and optional to the webapp. Not sent: the work PC's policy +# blocks both on the way to a non-GE share (they arrive as 0 bytes). +$SkipControlFiles = @("boot.json", "hw_drivers.json") function Format-Size { param([long]$Bytes) @@ -306,7 +310,7 @@ if ($IncludeDrivers) { } else { Write-Host " Drivers: SKIPPED -- $allDriverCount available, use -IncludeDrivers" -ForegroundColor Yellow } -Write-Host " Control: Always included" -ForegroundColor Gray +Write-Host " Control: Always included, except MCL's catalogs $($SkipControlFiles -join ', ') (PESetup does not read them)" -ForegroundColor Gray Write-Host " Tools: $(if (Test-Path $ToolsPath) { 'Yes' } else { 'Not found' })" -ForegroundColor $(if (Test-Path $ToolsPath) { "Gray" } else { "Yellow" }) Write-Host " Sources: $(if (Test-Path $SourcesZip) { 'Yes (from Boot\Sources.zip)' } else { 'Not found' })" -ForegroundColor $(if (Test-Path $SourcesZip) { "Gray" } else { "Yellow" }) Write-Host "" @@ -344,6 +348,10 @@ function Add-Tree { } } Add-Tree $DeployPath "Deploy" $ExcludedDeployDirs +$skipRel = @($SkipControlFiles | ForEach-Object { "Deploy\Control\$_".ToLower() }) +$kept = New-Object System.Collections.Generic.List[object] +foreach ($f in $sendList) { if ($skipRel -notcontains $f.Rel.ToLower()) { $kept.Add($f) } } +$sendList = $kept foreach ($d in $osDirs) { Add-Tree (Join-Path $CachePath $d) $d } foreach ($pkg in $matchedPkgs) { $pdir = Resolve-DestDir $pkg.destinationDir @@ -485,7 +493,8 @@ $rcArgs = @("/R:3", "/W:5", "/NP", "/ETA") # --- Step: Deploy base (Control, Applications, config -- skip big dirs) --- $stepNum++ Write-Step "[$stepNum/$totalSteps] Copying Deploy\ base (Control, Applications, config) ..." -robocopy $DeployPath "$Share\Deploy" /E /XD @ExcludedDeployDirs @rcArgs +$skipFull = @($SkipControlFiles | ForEach-Object { Join-Path $ControlPath $_ }) +robocopy $DeployPath "$Share\Deploy" /E /XD @ExcludedDeployDirs /XF @skipFull @rcArgs if ($LASTEXITCODE -ge 8) { Write-Host "ERROR: Deploy base copy failed (exit code $LASTEXITCODE)" -ForegroundColor Red; $failed = $true } # --- Step: Operating System ---