mirror of
https://github.com/j-a-n/raspberrymatic-addon-rmupdate.git
synced 2023-10-10 13:37:40 +02:00
Prefer x86 addon on ova
This commit is contained in:
parent
362bc12d1b
commit
05738139cc
@ -1064,10 +1064,8 @@ proc ::rmupdate::get_available_firmware_downloads {} {
|
|||||||
set fn [lindex [split $href "/"] end]
|
set fn [lindex [split $href "/"] end]
|
||||||
set tmp [split $fn "-"]
|
set tmp [split $fn "-"]
|
||||||
set v [lindex $tmp [expr {[llength $tmp] - 1}]]
|
set v [lindex $tmp [expr {[llength $tmp] - 1}]]
|
||||||
if { $v == "ova" && $rpi_version == "ova-KVM" } {
|
if { $v == "ova" && [string first "ova" $rpi_version] == 0 } {
|
||||||
write_log 4 "Using ova package for ova-KVM: ${href}"
|
write_log 4 "Using ova package for ${rpi_version}: ${href}"
|
||||||
} elseif { $v == "ova" && $rpi_version == "ova-Microsoft" } {
|
|
||||||
write_log 4 "Using ova package for ova-Microsoft: ${href}"
|
|
||||||
} elseif { $rpi_version != $v } {
|
} elseif { $rpi_version != $v } {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
@ -1512,6 +1510,10 @@ proc ::rmupdate::get_addon_info {{fetch_available_version 0} {fetch_download_url
|
|||||||
variable rc_dir
|
variable rc_dir
|
||||||
variable addons_www_dir
|
variable addons_www_dir
|
||||||
array set addons {}
|
array set addons {}
|
||||||
|
set x86 0
|
||||||
|
if {[string first "ova" [get_rpi_version]] == 0} {
|
||||||
|
set x86 1
|
||||||
|
}
|
||||||
foreach f [glob ${rc_dir}/*] {
|
foreach f [glob ${rc_dir}/*] {
|
||||||
catch {
|
catch {
|
||||||
set data [exec $f info]
|
set data [exec $f info]
|
||||||
@ -1639,17 +1641,23 @@ proc ::rmupdate::get_addon_info {{fetch_available_version 0} {fetch_download_url
|
|||||||
regexp $regex_version $filename m v
|
regexp $regex_version $filename m v
|
||||||
if { [info exists m] } {
|
if { [info exists m] } {
|
||||||
# version match
|
# version match
|
||||||
set prio [expr {$prio + 3}]
|
set prio [expr {$prio + 4}]
|
||||||
unset m
|
unset m
|
||||||
}
|
}
|
||||||
if {[string first "download" $filename] > -1} {
|
if {[string first "download" $filename] > -1} {
|
||||||
set prio [expr {$prio + 2}]
|
set prio [expr {$prio + 2}]
|
||||||
}
|
}
|
||||||
if {[string first "ccurm" $filename] > -1} {
|
if {[string first "ccurm" $filename] > -1 || [string first "ccu3" $filename] > -1} {
|
||||||
set prio [expr {$prio + 2}]
|
if {$x86 == 1} {
|
||||||
|
set prio [expr {$prio + 2}]
|
||||||
|
} else {
|
||||||
|
set prio [expr {$prio + 3}]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if {[string first "ccu3" $filename] > -1} {
|
if {[string first "x86" $filename] > -1} {
|
||||||
set prio [expr {$prio + 2}]
|
if {$x86 == 1} {
|
||||||
|
set prio [expr {$prio + 3}]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if {$prio > $best_prio} {
|
if {$prio > $best_prio} {
|
||||||
set best_prio $prio
|
set best_prio $prio
|
||||||
|
Loading…
x
Reference in New Issue
Block a user