Fix native MSI upgrade row validation and record successful 1.1 authoring
Rust development slice / linux (push) Failing after 6s
Rust development slice / linux (push) Failing after 6s
This commit is contained in:
@@ -260,10 +260,20 @@ try {
|
||||
Require ($row.Count -eq 1 -and $row[0][0] -ceq $condition -and $row[0][1] -ceq [string]$sequence[$action]) 'MSI_SEQUENCE_READBACK'
|
||||
}
|
||||
if($isUpgrade){
|
||||
$rows=Rows 'SELECT `UpgradeCode`,`VersionMin`,`VersionMax`,`Attributes`,`Remove`,`ActionProperty` FROM `Upgrade` WHERE `Language` IS NULL ORDER BY `ActionProperty`'
|
||||
$rows=Rows 'SELECT `UpgradeCode`,`VersionMin`,`VersionMax`,`Attributes`,`Remove`,`ActionProperty` FROM `Upgrade` WHERE `Language` IS NULL'
|
||||
Require ($rows.Count -eq 2) 'MSI_UPGRADE_ROW_COUNT'
|
||||
$expected=@(@($upgrade,'0.0.0','','258','ALL','RMM_ALL_PRODUCTS'),@($upgrade,'1.0.0','1.0.0','768','ALL','RMM_OLD_PRODUCTS'))
|
||||
for($i=0;$i -lt 2;$i++){for($j=0;$j -lt 6;$j++){Require ($rows[$i][$j] -ceq $expected[$i][$j]) 'MSI_UPGRADE_ROW_READBACK'}}
|
||||
# Match the logical rows by their unique ActionProperty. The native MSI
|
||||
# provider returned the committed rows in the opposite order during the
|
||||
# real 1.1 build; row order is not part of this package's contract.
|
||||
foreach($expectedRow in $expected){
|
||||
$match=-1
|
||||
for($i=0;$i -lt $rows.Count;$i++){
|
||||
if($rows[$i][5] -ceq $expectedRow[5]){Require ($match -eq -1) 'MSI_UPGRADE_ROW_KEY';$match=$i}
|
||||
}
|
||||
Require ($match -ge 0) 'MSI_UPGRADE_ROW_KEY'
|
||||
for($j=0;$j -lt 6;$j++){Require ($rows[$match][$j] -ceq $expectedRow[$j]) 'MSI_UPGRADE_ROW_READBACK'}
|
||||
}
|
||||
$nullMax=Rows 'SELECT `ActionProperty` FROM `Upgrade` WHERE `VersionMax` IS NULL'
|
||||
Require ($nullMax.Count -eq 1 -and $nullMax[0][0] -ceq 'RMM_ALL_PRODUCTS') 'MSI_UPGRADE_NULL_MAX_READBACK'
|
||||
$launch=Rows ("SELECT ``Description`` FROM ``LaunchCondition`` WHERE ``Condition``='$upgradeCondition'")
|
||||
|
||||
Reference in New Issue
Block a user