mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-23 08:10:16 -05:00
Merge pull request #334 from Icinga:fix/missing_architecture_check
Fix: Missing architecture check on installation from repository The architecture check was missing from the Icinga Repository installation, causing x86 packages being installed on x64 systems and vice versa.
This commit is contained in:
commit
16bff293ad
1 changed files with 5 additions and 0 deletions
|
|
@ -18,6 +18,7 @@ function Get-IcingaRepositoryPackage()
|
|||
$SourceRepo = $null;
|
||||
$RepoName = $null;
|
||||
[bool]$HasRepo = $FALSE;
|
||||
[bool]$Isx86 = [bool]([IntPtr]::Size -eq 4);
|
||||
|
||||
foreach ($entry in $Repositories) {
|
||||
$RepoContent = Read-IcingaRepositoryFile -Name $entry.Name;
|
||||
|
|
@ -45,6 +46,10 @@ function Get-IcingaRepositoryPackage()
|
|||
continue;
|
||||
}
|
||||
|
||||
if ($package.Architecture -ne 'Multi' -And $package.Architecture -eq 'x86' -And $Isx86 -eq $FALSE) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ([string]::IsNullOrEmpty($Version) -And ($null -eq $LatestVersion -Or $LatestVersion -lt $package.Version)) {
|
||||
[Version]$LatestVersion = [Version]$package.Version;
|
||||
$InstallPackage = $package;
|
||||
|
|
|
|||
Loading…
Reference in a new issue