From 895728ebe84cc399174d848e959ee11ddb357448 Mon Sep 17 00:00:00 2001 From: rbalsleyMSFT <53497092+rbalsleyMSFT@users.noreply.github.com> Date: Fri, 5 Jun 2026 10:41:00 -0700 Subject: [PATCH] Prefer DeviceGroup arch for Dell client drivers Use DeviceGroup OperatingSystem osArch when selecting Dell client driver packages, falling back to SupportedOperatingSystems when DeviceGroup metadata is absent. This keeps existing server catalog behavior unchanged. --- .../FFU.Common/FFU.Common.Drivers.Dell.psm1 | 25 ++++++++++++++++--- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/FFUDevelopment/FFU.Common/FFU.Common.Drivers.Dell.psm1 b/FFUDevelopment/FFU.Common/FFU.Common.Drivers.Dell.psm1 index a96ca37..a27ee68 100644 --- a/FFUDevelopment/FFU.Common/FFU.Common.Drivers.Dell.psm1 +++ b/FFUDevelopment/FFU.Common/FFU.Common.Drivers.Dell.psm1 @@ -26,6 +26,26 @@ function Compare-DellVendorVersion { return 0 } +function Test-DellDriverComponentOsArch { + [CmdletBinding()] + param( + [Parameter(Mandatory=$true)][System.Xml.XmlElement]$Component, + [Parameter(Mandatory=$true)][ValidateSet('x64', 'x86', 'ARM64')][string]$WindowsArch + ) + + $deviceGroupOsNodes = @($Component.SelectNodes("*[local-name()='DeviceGroup']/*[local-name()='OperatingSystem']")) + if ($deviceGroupOsNodes.Count -gt 0) { + $validDeviceGroupOs = $deviceGroupOsNodes | Where-Object { $_.GetAttribute('osArch') -eq $WindowsArch } | Select-Object -First 1 + return $null -ne $validDeviceGroupOs + } + + $supportedOsNodes = @($Component.SelectNodes("*[local-name()='SupportedOperatingSystems']/*[local-name()='OperatingSystem']")) + if ($supportedOsNodes.Count -eq 0) { return $false } + + $validSupportedOs = $supportedOsNodes | Where-Object { $_.GetAttribute('osArch') -eq $WindowsArch } | Select-Object -First 1 + return $null -ne $validSupportedOs +} + function Get-DellCatalogIndex { [CmdletBinding()] param( @@ -155,10 +175,7 @@ function Get-DellLatestDriverPackages { if ($ctype.GetAttribute('value') -ne 'DRVR') { continue } # OS filtering (arch only – release filtering intentionally minimal for now) - $osNodes = @($comp.SelectNodes("*[local-name()='SupportedOperatingSystems']/*[local-name()='OperatingSystem']")) - if (-not $osNodes) { continue } - $validOS = $osNodes | Where-Object { $_.GetAttribute('osArch') -eq $WindowsArch } | Select-Object -First 1 - if (-not $validOS) { continue } + if (-not (Test-DellDriverComponentOsArch -Component $comp -WindowsArch $WindowsArch)) { continue } $path = $comp.GetAttribute('path') if (-not $path) { continue }