<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch master
in repository macports-base.
</pre>
<p><a href="https://github.com/macports/macports-base/commit/57d9064beedff6ae0ba7002ca97892aeab642948">https://github.com/macports/macports-base/commit/57d9064beedff6ae0ba7002ca97892aeab642948</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 57d9064be macports.tcl: use dict for portinfo, options, etc
</span>57d9064be is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 57d9064beedff6ae0ba7002ca97892aeab642948
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Tue Feb 20 07:01:12 2024 +1100
<span style='display:block; white-space:pre;color:#404040;'> macports.tcl: use dict for portinfo, options, etc
</span>---
src/macports1.0/macports.tcl | 531 +++++++++++++++++++------------------------
1 file changed, 238 insertions(+), 293 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/macports1.0/macports.tcl b/src/macports1.0/macports.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 24068b672..9a6793f64 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/macports1.0/macports.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/macports1.0/macports.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -186,8 +186,8 @@ proc macports::init_logging {mport} {
</span> }
proc macports::ch_logging {mport} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- array set portinfo [mportinfo $mport]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set portname $portinfo(name)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set portinfo [mportinfo $mport]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set portname [dict get $portinfo name]
</span> set portpath [ditem_key $mport portpath]
set logname [macports::getportlogpath $portpath $portname]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -200,7 +200,7 @@ proc macports::ch_logging {mport} {
</span> set ::debuglog [open $::debuglogname a]
puts $::debuglog version:1
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_debug "Starting logging for $portname @$portinfo(version)_$portinfo(revision)$portinfo(canonical_active_variants)"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug "Starting logging for $portname @[dict get $portinfo version]_[dict get $portinfo revision][dict get $portinfo canonical_active_variants]"
</span> }
# log platform information
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2252,9 +2252,9 @@ proc _mportactive {mport} {
</span> set reslist [registry::entry installed $portname]
if {$reslist ne {}} {
set i [lindex $reslist 0]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- array set portinfo [mportinfo $mport]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[$i version] eq $portinfo(version) && [$i revision] == $portinfo(revision)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- && [$i variants] eq $portinfo(canonical_active_variants)} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set portinfo [mportinfo $mport]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[$i version] eq [dict get $portinfo version] && [$i revision] == [dict get $portinfo revision]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ && [$i variants] eq [dict get $portinfo canonical_active_variants]} {
</span> set ret 1
}
#registry::entry close $i
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2311,13 +2311,13 @@ proc _mportispresent {mport depspec} {
</span> # mport the port to check for conflicts
proc _mporterrorifconflictsinstalled {mport} {
set conflictlist [list]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- array set portinfo [mportinfo $mport]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set portinfo [mportinfo $mport]
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists portinfo(conflicts)] &&
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- [llength $portinfo(conflicts)] > 0} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[dict exists $portinfo conflicts] &&
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [llength [dict get $portinfo conflicts]] > 0} {
</span> ui_debug "Checking for conflicts against [_mportkey $mport subport]"
<span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach conflictport $portinfo(conflicts) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[_mportispresent $mport port:$conflictport]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach conflictport [dict get $portinfo conflicts] {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[_portnameactive $conflictport]} {
</span> lappend conflictlist $conflictport
}
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2327,35 +2327,33 @@ proc _mporterrorifconflictsinstalled {mport} {
</span>
if {[llength $conflictlist] != 0} {
if {[macports::global_option_isset ports_force]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_warn "Force option set; installing $portinfo(name) despite conflicts with: $conflictlist"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_warn "Force option set; installing [dict get $portinfo name] despite conflicts with: $conflictlist"
</span> } else {
if {![macports::ui_isset ports_debug]} {
ui_msg {}
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_error "Can't install $portinfo(name) because conflicting ports are active: $conflictlist"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_error "Can't install [dict get $portinfo name] because conflicting ports are active: $conflictlist"
</span> return -code error "conflicting ports"
}
}
}
# check if an error should be raised due to known_fail being set in a port
<span style='display:block; white-space:pre;background:#ffe0e0;'>-proc _mportcheck_known_fail {optionsvar portinfovar} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- upvar $optionsvar options
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- upvar $portinfovar portinfo
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {([info exists portinfo(known_fail)] && [string is true -strict $portinfo(known_fail)])
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- && !([info exists options(ignore_known_fail)] && [string is true -strict $options(ignore_known_fail)])} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+proc _mportcheck_known_fail {options portinfo} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {([dict exists $portinfo known_fail] && [string is true -strict [dict get $portinfo known_fail]])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ && !([dict exists $options ignore_known_fail] && [string is true -strict [dict get $options ignore_known_fail]])} {
</span> # "Computing dependencies for" won't be followed by a newline yet
if {![macports::ui_isset ports_debug]} {
ui_msg {}
}
if {[info exists macports::ui_options(questions_yesno)]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set retvalue [$macports::ui_options(questions_yesno) "$portinfo(name) is known to fail." "_mportcheck_known_fail" {} {n} 0 "Try to install anyway?"]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set retvalue [$macports::ui_options(questions_yesno) "[dict get $portinfo name] is known to fail." "_mportcheck_known_fail" {} {n} 0 "Try to install anyway?"]
</span> if {$retvalue != 0} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_error "$portinfo(name) is known to fail"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_error "[dict get $portinfo name] is known to fail"
</span> return 1
}
} else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_error "$portinfo(name) is known to fail"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_error "[dict get $portinfo name] is known to fail"
</span> return 1
}
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2578,7 +2576,7 @@ proc macports::_upgrade_mport_deps {mport target} {
</span> set options [ditem_key $mport options]
set workername [ditem_key $mport workername]
set deptypes [macports::_deptypes_for_target $target $workername]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- array set portinfo [mportinfo $mport]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set portinfo [mportinfo $mport]
</span> array set depscache {}
set required_archs [$workername eval [list get_canonical_archs]]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2590,13 +2588,13 @@ proc macports::_upgrade_mport_deps {mport target} {
</span> set test _portnameactive
foreach deptype $deptypes {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists portinfo($deptype)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![dict exists $portinfo $deptype]} {
</span> continue
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach depspec $portinfo($deptype) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach depspec [dict get $portinfo $deptype] {
</span> set dep_portname [$workername eval [list _get_dep_port $depspec]]
if {$dep_portname ne "" && ![info exists depscache(port:$dep_portname)] && [$test $dep_portname]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set variants [list]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set variants [dict create]
</span>
# check that the dep has the required archs
set active_archs [_active_archs $dep_portname]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2609,15 +2607,13 @@ proc macports::_upgrade_mport_deps {mport target} {
</span> }
}
if {[llength $missing] > 0} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set res [mportlookup $dep_portname]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- array unset dep_portinfo
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- array set dep_portinfo [lindex $res 1]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists dep_portinfo(installs_libs)] && !$dep_portinfo(installs_libs)} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lassign [mportlookup $dep_portname] dep_portname dep_portinfo
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[dict exists $dep_portinfo installs_libs] && ![dict get $dep_portinfo installs_libs]} {
</span> set missing [list]
}
}
if {[llength $missing] > 0} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists dep_portinfo(variants)] && "universal" in $dep_portinfo(variants)} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[dict exists $dep_portinfo variants] && "universal" in [dict get $dep_portinfo variants]} {
</span> # dep offers a universal variant
if {[llength $active_archs] == 1} {
# not installed universal
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2634,8 +2630,8 @@ proc macports::_upgrade_mport_deps {mport target} {
</span> return -code error "architecture mismatch"
} else {
# upgrade the dep with +universal
<span style='display:block; white-space:pre;background:#ffe0e0;'>- lappend variants universal +
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- lappend options ports_upgrade_enforce-variants yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dict set variants universal +
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dict set options ports_upgrade_enforce-variants yes
</span> ui_debug "enforcing +universal upgrade for $dep_portname"
}
} else {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2872,14 +2868,14 @@ proc macports::UpdateVCS {cmd dir} {
</span> return -options $options $result
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-proc mportsync {{optionslist {}}} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+proc mportsync {{options {}}} {
</span> global macports::sources macports::rsync_options \
macports::portverbose macports::autoconf::rsync_path \
macports::autoconf::tar_path macports::autoconf::openssl_path \
macports::ui_options
<span style='display:block; white-space:pre;background:#ffe0e0;'>- array set options $optionslist
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists options(no_reindex)]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- upvar $options(needed_portindex_var) any_needed_portindex
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[dict exists $options no_reindex]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ upvar [dict get $options needed_portindex_var] any_needed_portindex
</span> }
set numfailed 0
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3017,7 +3013,7 @@ proc mportsync {{optionslist {}}} {
</span> set needs_portindex true
# now sync the index if the local file is missing or older than a day
if {![file isfile $indexfile] || [clock seconds] - [file mtime $indexfile] > 86400
<span style='display:block; white-space:pre;background:#ffe0e0;'>- || [info exists options(no_reindex)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ || [dict exists $options no_reindex]} {
</span> set include_option "--include=/PortIndex --exclude=*"
if {$is_tarball} {
# chop ports.tar off the end
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3089,7 +3085,7 @@ proc mportsync {{optionslist {}}} {
</span> }
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {(![info exists options(ports_force)] || !$options(ports_force)) && $updated <= 0} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {(![dict exists $options ports_force] || ![dict get $options ports_force]) && $updated <= 0} {
</span> ui_info "No updates for $source"
continue
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3161,7 +3157,7 @@ proc mportsync {{optionslist {}}} {
</span>
if {$needs_portindex} {
set any_needed_portindex true
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists options(no_reindex)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![dict exists $options no_reindex]} {
</span> global macports::prefix
set indexdir [file dirname [macports::getindex $source]]
if {[catch {system "${macports::prefix}/bin/portindex [macports::shellescape $indexdir]"}]} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3242,19 +3238,17 @@ proc mportsearch {pattern {case_sensitive yes} {matchstyle regexp} {field name}}
</span> macports_try -pass_signal {
incr found 1
while {[gets $fd line] >= 0} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- array unset portinfo
</span> set name [lindex $line 0]
set len [lindex $line 1]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set line [read $fd $len]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set portinfo [read $fd $len]
</span>
if {$easy} {
set target $name
} else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- array set portinfo $line
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists portinfo($field)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![dict exists $portinfo $field]} {
</span> continue
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set target $portinfo($field)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set target [dict get $portinfo $field]
</span> }
switch -- $matchstyle {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3286,9 +3280,6 @@ proc mportsearch {pattern {case_sensitive yes} {matchstyle regexp} {field name}}
</span> }
if {$matchres == 1} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$easy} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- array set portinfo $line
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span> switch -- $protocol {
rsync {
# Rsync files are local
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3304,15 +3295,14 @@ proc mportsearch {pattern {case_sensitive yes} {matchstyle regexp} {field name}}
</span> set source_url $source
}
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists portinfo(portdir)]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set porturl ${source_url}/$portinfo(portdir)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- lappend line porturl $porturl
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[dict exists $portinfo portdir]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set porturl ${source_url}/[dict get $portinfo portdir]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dict set portinfo porturl $porturl
</span> ui_debug "Found port in $porturl"
} else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_debug "Found port info: $line"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug "Found port info: $portinfo"
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>- lappend matches $name
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- lappend matches $line
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lappend matches $name $portinfo
</span> }
}
} on error {_ eOptions} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3351,17 +3341,18 @@ proc mportlookup {name} {
</span>
set sourceno 0
set matches [list]
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ set normname [string tolower $name]
</span> foreach source $::macports::sources {
set source [lindex $source 0]
set protocol [macports::getprotocol $source]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![dict exists $quick_index ${sourceno} [string tolower $name]]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![dict exists $quick_index $sourceno $normname]} {
</span> # no entry in this source, advance to next source
incr sourceno 1
continue
}
# The quick index is keyed on the port name, and provides the offset in
# the main PortIndex where the given port's PortInfo line can be found.
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set offset [dict get $quick_index ${sourceno} [string tolower $name]]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set offset [dict get $quick_index $sourceno $normname]
</span> incr sourceno 1
if {[catch {set fd [open [macports::getindex $source] r]} result]} {
ui_warn "Can't open index file for source: $source"
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3371,9 +3362,7 @@ proc mportlookup {name} {
</span> gets $fd line
set name [lindex $line 0]
set len [lindex $line 1]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set line [read $fd $len]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- array set portinfo $line
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set portinfo [read $fd $len]
</span>
switch -- $protocol {
rsync {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3388,11 +3377,10 @@ proc mportlookup {name} {
</span> set source_url $source
}
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists portinfo(portdir)]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- lappend line porturl ${source_url}/$portinfo(portdir)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[dict exists $portinfo portdir]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dict set portinfo porturl ${source_url}/[dict get $portinfo portdir]
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>- lappend matches $name
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- lappend matches $line
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lappend matches $name $portinfo
</span> } on error {_ eOptions} {
ui_warn "It looks like your PortIndex file for $source may be corrupt."
throw [dict get $eOptions -errorcode] [dict get $eOptions -errorinfo]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3432,12 +3420,9 @@ proc mportlistall {} {
</span> macports_try -pass_signal {
incr found 1
while {[gets $fd line] >= 0} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- array unset portinfo
</span> set name [lindex $line 0]
set len [lindex $line 1]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set line [read $fd $len]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- array set portinfo $line
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set portinfo [read $fd $len]
</span>
switch -- $protocol {
rsync {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3452,10 +3437,10 @@ proc mportlistall {} {
</span> set source_url $source
}
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists portinfo(portdir)]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- lappend line porturl ${source_url}/$portinfo(portdir)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[dict exists $portinfo portdir]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dict set portinfo porturl ${source_url}/[dict get $portinfo portdir]
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>- lappend matches $name $line
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lappend matches $name $portinfo
</span> }
} on error {_ eOptions} {
ui_warn "It looks like your PortIndex file for $source may be corrupt."
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3582,7 +3567,7 @@ proc mports_generate_quickindex {index} {
</span>
proc mportinfo {mport} {
set workername [ditem_key $mport workername]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- return [$workername eval [list array get ::PortInfo]]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return [dict create {*}[$workername eval [list array get ::PortInfo]]]
</span> }
proc mportclose {mport} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3642,11 +3627,11 @@ proc _mportkey {mport key} {
</span> # return 0 if everything was ok, an non zero integer otherwise.
proc mportdepends {mport {target {}} {recurseDeps 1} {skipSatisfied 1} {accDeps 0} {depListName {}}} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- array set portinfo [mportinfo $mport]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set portinfo [mportinfo $mport]
</span> if {$accDeps} {
upvar port_seen port_seen
} else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- array set port_seen {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set port_seen [dict create]
</span> }
if {$depListName ne {}} {
upvar $depListName depList
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3659,10 +3644,10 @@ proc mportdepends {mport {target {}} {recurseDeps 1} {skipSatisfied 1} {accDeps
</span> flush stdout
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- array set optionsarray [ditem_key $mport options]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set options [ditem_key $mport options]
</span>
if {$target in {{} install activate}} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$target eq {} && [_mportcheck_known_fail optionsarray portinfo]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$target eq {} && [_mportcheck_known_fail $options $portinfo]} {
</span> return 1
}
if {[catch {_mporterrorifconflictsinstalled $mport}]} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3676,44 +3661,44 @@ proc mportdepends {mport {target {}} {recurseDeps 1} {skipSatisfied 1} {accDeps
</span> set depPorts [list]
if {[llength $deptypes] > 0} {
# avoid propagating requested flag from parent
<span style='display:block; white-space:pre;background:#ffe0e0;'>- unset -nocomplain optionsarray(ports_requested)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dict unset options ports_requested
</span> # subport will be different for deps
<span style='display:block; white-space:pre;background:#ffe0e0;'>- unset -nocomplain optionsarray(subport)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set options [array get optionsarray]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dict unset options subport
</span> set variations [ditem_key $mport variations]
set required_archs [$workername eval [list get_canonical_archs]]
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ set required_archs_len [llength $required_archs]
</span> set depends_skip_archcheck [_mportkey $mport depends_skip_archcheck]
}
# Process the dependencies for each of the deptypes
foreach deptype $deptypes {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists portinfo($deptype)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![dict exists $portinfo $deptype]} {
</span> continue
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach depspec $portinfo($deptype) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach depspec [dict get $portinfo $deptype] {
</span> # get the portname that satisfies the depspec
set dep_portname [$workername eval [list _get_dep_port $depspec]]
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ # normalise to lower case for equality checks
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set dep_portname_norm [string tolower $dep_portname]
</span> # skip port/archs combos we've already seen, and ones with the same port but less archs than ones we've seen (or noarch)
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set seenkey ${dep_portname},[join $required_archs ,]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set seenkeys [list $dep_portname_norm $required_archs]
</span> set seen 0
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists port_seen($seenkey)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[dict exists $port_seen {*}$seenkeys]} {
</span> set seen 1
<span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set prev_seenkeys [array names port_seen ${dep_portname},*]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set nrequired [llength $required_archs]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach key $prev_seenkeys {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set key_archs [lrange [split $key ,] 1 end]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$key_archs eq "noarch" || $required_archs eq "noarch" || [llength $key_archs] > $nrequired} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } elseif {[dict exists $port_seen $dep_portname_norm]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set prev_seen_archs [dict keys [dict get $port_seen $dep_portname_norm]]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach prev_archs $prev_seen_archs {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$prev_archs eq "noarch" || $required_archs eq "noarch" || [llength $prev_archs] > $required_archs_len} {
</span> set seen 1
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set seenkey $key
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set seenkeys [list $dep_portname_norm $prev_archs]
</span> break
}
}
}
if {$seen} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$port_seen($seenkey) != 0} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[dict get $port_seen {*}$seenkeys] != 0} {
</span> # nonzero means the dep is not satisfied, so we have to record it
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ditem_append_unique $mport requires $port_seen($seenkey)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ditem_append_unique $mport requires [dict get $port_seen {*}$seenkeys]
</span> }
continue
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3724,6 +3709,7 @@ proc mportdepends {mport {target {}} {recurseDeps 1} {skipSatisfied 1} {accDeps
</span>
if {!$skipSatisfied && $dep_portname eq ""} {
set dep_portname [lindex [split $depspec :] end]
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ set dep_portname_norm [string tolower $dep_portname]
</span> }
set check_archs 0
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3748,15 +3734,14 @@ proc mportdepends {mport {target {}} {recurseDeps 1} {skipSatisfied 1} {accDeps
</span> return 1
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- array unset dep_portinfo
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- array set dep_portinfo [lindex $res 1]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists dep_portinfo(porturl)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set dep_portinfo [lindex $res 1]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![dict exists $dep_portinfo porturl]} {
</span> if {![macports::ui_isset ports_debug]} {
ui_msg {}
}
ui_error "Dependency '$dep_portname' not found."
return 1
<span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {[info exists dep_portinfo(installs_libs)] && !$dep_portinfo(installs_libs)} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } elseif {[dict exists $dep_portinfo installs_libs] && ![dict get $dep_portinfo installs_libs]} {
</span> set check_archs 0
if {$skipSatisfied && $present} {
set parse 0
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3765,19 +3750,19 @@ proc mportdepends {mport {target {}} {recurseDeps 1} {skipSatisfied 1} {accDeps
</span>
if {$parse} {
set dep_options $options
<span style='display:block; white-space:pre;background:#ffe0e0;'>- lappend dep_options subport $dep_portinfo(name)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dict set dep_options subport [dict get $dep_portinfo name]
</span> # Figure out the depport. Check the depList (or open_mports) first, since
# we potentially leak mport references if we mportopen each time,
# because mportexec only closes each open mport once.
set matchlistname [expr {$depListName ne {} ? "depList" : "macports::open_mports"}]
set comparators [dict create options dictequal]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set depport_matches [dlist_match_multi [set $matchlistname] [list porturl $dep_portinfo(porturl) options $dep_options] $comparators]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set depport_matches [dlist_match_multi [set $matchlistname] [list porturl [dict get $dep_portinfo porturl] options $dep_options] $comparators]
</span> # if multiple matches, the most recently opened one is more likely what we want
set depport [lindex $depport_matches end]
if {$depport eq ""} {
# We haven't opened this one yet.
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set depport [mportopen $dep_portinfo(porturl) $dep_options $variations]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set depport [mportopen [dict get $dep_portinfo porturl] $dep_options $variations]
</span> if {$depListName ne {}} {
lappend depList $depport
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3790,21 +3775,20 @@ proc mportdepends {mport {target {}} {recurseDeps 1} {skipSatisfied 1} {accDeps
</span> && ![macports::_mport_supports_archs $depport $required_archs]} {
set supported_archs [_mportkey $depport supported_archs]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- array unset variation_array
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- array set variation_array [[ditem_key $depport workername] eval [list array get requested_variations]]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set dep_variations [[ditem_key $depport workername] eval [list array get requested_variations]]
</span> mportclose $depport
if {$depListName ne {}} {
dlist_delete depList $depport
}
set arch_mismatch 1
set has_universal 0
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists dep_portinfo(variants)] && {universal} in $dep_portinfo(variants)} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[dict exists $dep_portinfo variants] && {universal} in [dict get $dep_portinfo variants]} {
</span> # a universal variant is offered
set has_universal 1
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists variation_array(universal)] || $variation_array(universal) ne "+"} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set variation_array(universal) +
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![dict exists $dep_variations universal] || [dict get $dep_variations universal] ne "+"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dict set dep_variations universal +
</span> # try again with +universal
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set depport [mportopen $dep_portinfo(porturl) $dep_options [array get variation_array]]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set depport [mportopen [dict get $dep_portinfo porturl] $dep_options $dep_variations]
</span> if {[macports::_mport_supports_archs $depport $required_archs]} {
set arch_mismatch 0
if {$depListName ne {}} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3829,10 +3813,10 @@ proc mportdepends {mport {target {}} {recurseDeps 1} {skipSatisfied 1} {accDeps
</span> set depport_provides [ditem_key $depport provides]
ditem_append_unique $mport requires $depport_provides
# record actual archs we ended up getting
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set port_seen(${dep_portname},[join [macports::_mport_archs $depport] ,]) $depport_provides
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dict set port_seen $dep_portname_norm [macports::_mport_archs $depport] $depport_provides
</span> } elseif {$present && $dep_portname ne ""} {
# record actual installed archs
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set port_seen(${dep_portname},[join [macports::_active_archs $dep_portname] ,]) 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dict set port_seen $dep_portname_norm [macports::_active_archs $dep_portname] 0
</span> }
}
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3950,9 +3934,9 @@ proc macports::_explain_arch_mismatch {port dep required_archs supported_archs h
</span>
# check if the given mport has any dependencies of the given types
proc macports::_mport_has_deptypes {mport deptypes} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- array set portinfo [mportinfo $mport]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set portinfo [mportinfo $mport]
</span> foreach type $deptypes {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists portinfo($type)] && $portinfo($type) ne ""} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[dict exists $portinfo $type] && [dict get $portinfo $type] ne ""} {
</span> return 1
}
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4069,8 +4053,8 @@ proc macports::_deptype_needs_archcheck {deptype} {
</span> }
# selfupdate procedure
<span style='display:block; white-space:pre;background:#ffe0e0;'>-proc macports::selfupdate {{optionslist {}} {updatestatusvar {}}} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return [uplevel [list selfupdate::main $optionslist $updatestatusvar]]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+proc macports::selfupdate {{options {}} {updatestatusvar {}}} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return [uplevel [list selfupdate::main $options $updatestatusvar]]
</span> }
# upgrade API wrapper procedure
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4079,7 +4063,7 @@ proc macports::selfupdate {{optionslist {}} {updatestatusvar {}}} {
</span> # 1 = general failure
# 2 = port name not found in index
# 3 = port not installed
<span style='display:block; white-space:pre;background:#ffe0e0;'>-proc macports::upgrade {portname dspec variationslist optionslist {depscachename {}}} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+proc macports::upgrade {portname dspec variations options {depscachename {}}} {
</span> # only installed ports can be upgraded
set ilist [registry::entry imaged $portname]
if {$ilist eq {}} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4102,7 +4086,7 @@ proc macports::upgrade {portname dspec variationslist optionslist {depscachename
</span> }
# run the actual upgrade
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set status [macports::_upgrade $portname $dspec $variationslist $optionslist depscache]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set status [macports::_upgrade $portname $dspec $variations $options depscache]
</span>
if {!$orig_nodeps} {
unset -nocomplain macports::global_options(ports_nodeps)
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4112,9 +4096,8 @@ proc macports::upgrade {portname dspec variationslist optionslist {depscachename
</span> }
# main internal upgrade procedure
<span style='display:block; white-space:pre;background:#ffe0e0;'>-proc macports::_upgrade {portname dspec variationslist optionslist {depscachename {}}} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+proc macports::_upgrade {portname dspec variations options {depscachename {}}} {
</span> global macports::global_variations
<span style='display:block; white-space:pre;background:#ffe0e0;'>- array set options $optionslist
</span>
if {$depscachename ne ""} {
upvar $depscachename depscache
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4122,24 +4105,24 @@ proc macports::_upgrade {portname dspec variationslist optionslist {depscachenam
</span>
# Is this a dry run?
set is_dryrun no
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists options(ports_dryrun)] && $options(ports_dryrun)} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[dict exists $options ports_dryrun] && [dict get $options ports_dryrun]} {
</span> set is_dryrun yes
}
# Is this a rev-upgrade-called run?
set is_revupgrade no
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists options(ports_revupgrade)] && $options(ports_revupgrade)} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[dict exists $options ports_revupgrade] && [dict get $options ports_revupgrade]} {
</span> set is_revupgrade yes
# unset revupgrade options so we can upgrade dependencies with the same
# $options without also triggering a rebuild there, see #40150
<span style='display:block; white-space:pre;background:#ffe0e0;'>- unset options(ports_revupgrade)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dict unset options ports_revupgrade
</span> }
set is_revupgrade_second_run no
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists options(ports_revupgrade_second_run)] && $options(ports_revupgrade_second_run)} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[dict exists $options ports_revupgrade_second_run] && [dict get $options ports_revupgrade_second_run]} {
</span> set is_revupgrade_second_run yes
# unset revupgrade options so we can upgrade dependencies with the same
# $options without also triggering a rebuild there, see #40150
<span style='display:block; white-space:pre;background:#ffe0e0;'>- unset options(ports_revupgrade_second_run)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dict unset options ports_revupgrade_second_run
</span> }
# check if the port is in tree
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4157,10 +4140,15 @@ proc macports::_upgrade {portname dspec variationslist optionslist {depscachenam
</span> return 2
}
# fill array with information
<span style='display:block; white-space:pre;background:#ffe0e0;'>- array set portinfo [lindex $result 1]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lassign $result portname portinfo
</span> # set portname again since the one we were passed may not have had the correct case
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set portname $portinfo(name)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set options(subport) $portname
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dict set options subport $portname
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Note $called_variations retains the original
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # requested variations, which should be passed to recursive calls to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # upgrade; while variations gets existing variants and global variations
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # merged in later on, so it applies only to this port's upgrade
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set called_variations $variations
</span>
if {[catch {registry::entry imaged $portname} result]} {
ui_error "Checking installed version failed: $result"
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4174,32 +4162,23 @@ proc macports::_upgrade {portname dspec variationslist optionslist {depscachenam
</span> upvar 2 mport parentmport
if {![_mportispresent $parentmport $dspec]} {
# open porthandle
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set porturl $portinfo(porturl)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists porturl]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set porturl file://./
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set porturl [dict get $portinfo porturl]
</span> # Merge in global variants
<span style='display:block; white-space:pre;background:#ffe0e0;'>- array set variations $variationslist
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach {variation value} [array get macports::global_variations] {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists variations($variation)]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set variations($variation) $value
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_debug "fully merged portvariants: [array get variations]"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set variations [dict merge [array get macports::global_variations] $variations]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug "fully merged portvariants: $variations"
</span> # Don't inherit requested status from the depending port
<span style='display:block; white-space:pre;background:#ffe0e0;'>- unset -nocomplain options(ports_requested)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dict unset options ports_requested
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[catch {_mport_open_with_archcheck $porturl $dspec $parentmport [array get options] [array get variations]} mport]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[catch {_mport_open_with_archcheck $porturl $dspec $parentmport $options $variations} mport]} {
</span> return 1
}
# While we're at it, update the portinfo
<span style='display:block; white-space:pre;background:#ffe0e0;'>- array unset portinfo
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- array set portinfo [mportinfo $mport]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set portinfo [mportinfo $mport]
</span>
# mark it in the cache now to guard against circular dependencies
set depscache(port:$portname) 1
# upgrade its dependencies first
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set status [_upgrade_dependencies portinfo depscache variationslist options]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set status [_upgrade_dependencies $portinfo depscache $called_variations $options]
</span> if {$status != 0 && $status != 2 && ![ui_isset ports_processall]} {
catch {mportclose $mport}
return $status
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4232,14 +4211,14 @@ proc macports::_upgrade {portname dspec variationslist optionslist {depscachenam
</span> }
# set version_in_tree and revision_in_tree
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists portinfo(version)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![dict exists $portinfo version]} {
</span> ui_error "Invalid port entry for ${portname}, missing version"
_upgrade_cleanup
return 1
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set version_in_tree $portinfo(version)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set revision_in_tree $portinfo(revision)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set epoch_in_tree $portinfo(epoch)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set version_in_tree [dict get $portinfo version]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set revision_in_tree [dict get $portinfo revision]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set epoch_in_tree [dict get $portinfo epoch]
</span>
# find latest version installed and active version (if any)
set anyactive no
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4299,25 +4278,14 @@ proc macports::_upgrade {portname dspec variationslist optionslist {depscachenam
</span> if {[catch {$regref cxx_stdlib_overridden} cxx_stdlib_overridden]} {
set cxx_stdlib_overridden 0
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists options(ports_do_dependents)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[dict exists $options ports_do_dependents]} {
</span> set dependents_list [$regref dependents]
}
# Before we do
# dependencies, we need to figure out the final variants,
# open the port, and update the portinfo.
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set porturl $portinfo(porturl)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists porturl]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set porturl file://./
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # Note $variationslist is left alone and so retains the original
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # requested variations, which should be passed to recursive calls to
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # upgrade; while variations gets existing variants and global variations
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # merged in later on, so it applies only to this port's upgrade
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- array set variations $variationslist
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set globalvarlist [array get macports::global_variations]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set porturl [dict get $portinfo porturl]
</span>
# Relies on all negated variants being at the end of requested_variants
set splitvariant [split $oldrequestedvariant -]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4325,91 +4293,75 @@ proc macports::_upgrade {portname dspec variationslist optionslist {depscachenam
</span> set splitvariant [split [lindex $splitvariant 0] +]
set plusvariant [lrange $splitvariant 1 end]
ui_debug "Merging existing requested variants '${oldrequestedvariant}' into variants"
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set oldvariantlist [list]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set oldrequestedvariations [dict create]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # also save the current variants for dependency calculation
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # purposes in case we don't end up upgrading this port
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set installedvariations [dict create]
</span> foreach v $plusvariant {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- lappend oldvariantlist $v +
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dict set oldrequestedvariations $v +
</span> }
foreach v $minusvariant {
if {[string first "+" $v] == -1} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- lappend oldvariantlist $v -
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set installedvariations($v) -
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dict set oldrequestedvariations $v -
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dict set installedvariations $v -
</span> } else {
ui_warn "Invalid negated variant for ${portname}: $v"
}
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- # save the current variants for dependency calculation purposes
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # in case we don't end up upgrading this port
</span> set plusvariant [lrange [split $oldvariant +] 1 end]
foreach v $plusvariant {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set installedvariations($v) +
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dict set installedvariations $v +
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>- # merge in the old requested variants
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach {variation value} $oldvariantlist {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists variations($variation)]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set variations($variation) $value
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Now merge all the variations. Global (i.e. variants.conf) ones are
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # overridden by the previous requested variants, which are overridden
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # by the currently requested variants.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set variations [dict merge [array get macports::global_variations] $oldrequestedvariations $variations]
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- # Now merge in the global (i.e. variants.conf) variations.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # We wait until now so that existing requested variants for this port
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # override global variations
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach {variation value} $globalvarlist {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists variations($variation)]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set variations($variation) $value
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_debug "new fully merged portvariants: [array get variations]"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug "new fully merged portvariants: $variations"
</span>
# at this point we need to check if a different port will be replacing this one
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists portinfo(replaced_by)] && ![info exists options(ports_upgrade_no-replace)]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg "$macports::ui_prefix $portname is replaced by $portinfo(replaced_by)"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[catch {mportlookup $portinfo(replaced_by)} result]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[dict exists $portinfo replaced_by] && ![dict exists $options ports_upgrade_no-replace]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "$macports::ui_prefix $portname is replaced by [dict get $portinfo replaced_by]"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[catch {mportlookup [dict get $portinfo replaced_by]} result]} {
</span> ui_debug $::errorInfo
ui_error "port lookup failed: $result"
_upgrade_cleanup
return 1
}
if {$result eq ""} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_error "No port $portinfo(replaced_by) found."
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_error "No port [dict get $portinfo replaced_by] found."
</span> _upgrade_cleanup
return 1
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- array unset portinfo
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- array set portinfo [lindex $result 1]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set newname $portinfo(name)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lassign $result newname portinfo
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set porturl $portinfo(porturl)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists porturl]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set porturl file://./
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set porturl [dict get $portinfo porturl]
</span> set depscache(port:$newname) 1
} else {
set newname $portname
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- array set interp_options [array get options]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set interp_options(ports_requested) $requestedflag
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set interp_options(subport) $newname
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set interp_options $options
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dict set interp_options ports_requested $requestedflag
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dict set interp_options subport $newname
</span> # Mark this port to be rebuilt from source if this isn't the first time it
# was flagged as broken by rev-upgrade
if {$is_revupgrade_second_run} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set interp_options(ports_source_only) yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dict set interp_options ports_source_only yes
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[catch {set mport [mportopen $porturl [array get interp_options] [array get variations]]} result]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[catch {set mport [mportopen $porturl $interp_options $variations]} result]} {
</span> ui_debug $::errorInfo
ui_error "Unable to open port: $result"
_upgrade_cleanup
return 1
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- array unset portinfo
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- array set portinfo [mportinfo $mport]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set version_in_tree $portinfo(version)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set revision_in_tree $portinfo(revision)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set epoch_in_tree $portinfo(epoch)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set portinfo [mportinfo $mport]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set version_in_tree [dict get $portinfo version]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set revision_in_tree [dict get $portinfo revision]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set epoch_in_tree [dict get $portinfo epoch]
</span>
set build_override 0
set will_install yes
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4417,14 +4369,14 @@ proc macports::_upgrade {portname dspec variationslist optionslist {depscachenam
</span> if {([vercmp $version_installed $version_in_tree] > 0
|| ([vercmp $version_installed $version_in_tree] == 0
&& [vercmp $revision_installed $revision_in_tree] >= 0))
<span style='display:block; white-space:pre;background:#ffe0e0;'>- && ![info exists options(ports_upgrade_force)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ && ![dict exists $options ports_upgrade_force]} {
</span> if {$portname ne $newname} {
ui_debug "ignoring versions, installing replacement port"
} elseif {$epoch_installed < $epoch_in_tree && $version_installed ne $version_in_tree} {
set build_override 1
ui_debug "epoch override ... upgrading!"
<span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {[info exists options(ports_upgrade_enforce-variants)] && $options(ports_upgrade_enforce-variants)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- && [info exists portinfo(canonical_active_variants)] && $portinfo(canonical_active_variants) ne $oldvariant} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } elseif {[dict exists $options ports_upgrade_enforce-variants] && [dict get $options ports_upgrade_enforce-variants]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ && [dict exists $portinfo canonical_active_variants] && [dict get $portinfo canonical_active_variants] ne $oldvariant} {
</span> ui_debug "variant override ... upgrading!"
} elseif {$os_platform_installed ni [list any "" 0] && $os_major_installed ne ""
&& ([_mportkey $mport os.platform] ne $os_platform_installed
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4443,15 +4395,15 @@ proc macports::_upgrade {portname dspec variationslist optionslist {depscachenam
</span> # in the first run of rev-upgrade, only activate possibly already existing files and check for missing dependencies
# do nothing, just prevent will_install being set to no below
} else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists portinfo(canonical_active_variants)] && $portinfo(canonical_active_variants) ne $oldvariant} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[llength $variationslist] > 0} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_warn "Skipping upgrade since $portname ${version_installed}_$revision_installed >= $portname ${version_in_tree}_${revision_in_tree}, even though installed variants \"$oldvariant\" do not match \"$portinfo(canonical_active_variants)\". Use 'upgrade --enforce-variants' to switch to the requested variants."
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[dict exists $portinfo canonical_active_variants] && [dict get $portinfo canonical_active_variants] ne $oldvariant} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[dict size $called_variations] > 0} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_warn "Skipping upgrade since $portname ${version_installed}_$revision_installed >= $portname ${version_in_tree}_${revision_in_tree}, even though installed variants \"$oldvariant\" do not match \"[dict get $portinfo canonical_active_variants]\". Use 'upgrade --enforce-variants' to switch to the requested variants."
</span> } else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_debug "Skipping upgrade since $portname ${version_installed}_$revision_installed >= $portname ${version_in_tree}_${revision_in_tree}, even though installed variants \"$oldvariant\" do not match \"$portinfo(canonical_active_variants)\"."
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug "Skipping upgrade since $portname ${version_installed}_$revision_installed >= $portname ${version_in_tree}_${revision_in_tree}, even though installed variants \"$oldvariant\" do not match \"[dict get $portinfo canonical_active_variants]\"."
</span> }
# reopen with the installed variants so deps are calculated correctly
catch {mportclose $mport}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[catch {set mport [mportopen $porturl [array get interp_options] [array get installedvariations]]} result]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[catch {set mport [mportopen $porturl $interp_options $installedvariations]} result]} {
</span> ui_debug $::errorInfo
ui_error "Unable to open port: $result"
_upgrade_cleanup
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4465,19 +4417,19 @@ proc macports::_upgrade {portname dspec variationslist optionslist {depscachenam
</span> }
set will_build no
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set already_installed [registry::entry_exists $newname $version_in_tree $revision_in_tree $portinfo(canonical_active_variants)]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set already_installed [registry::entry_exists $newname $version_in_tree $revision_in_tree [dict get $portinfo canonical_active_variants]]
</span> # avoid building again unnecessarily
if {$will_install &&
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ([info exists options(ports_upgrade_force)]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ([dict exists $options ports_upgrade_force]
</span> || $build_override == 1
|| !$already_installed)} {
set will_build yes
}
# first upgrade dependencies
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists options(ports_nodeps)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![dict exists $options ports_nodeps]} {
</span> # the last arg is because we might have to build from source if a rebuild is being forced
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set status [_upgrade_dependencies portinfo depscache variationslist options [expr {$will_build && $already_installed}]]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set status [_upgrade_dependencies $portinfo depscache $called_variations $options [expr {$will_build && $already_installed}]]
</span> if {$status != 0 && $status != 2 && ![ui_isset ports_processall]} {
_upgrade_cleanup
return $status
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4490,9 +4442,9 @@ proc macports::_upgrade {portname dspec variationslist optionslist {depscachenam
</span> # not upgrading this port, so just update its metadata
_upgrade_metadata $mport $regref $is_dryrun
# check if we have to do dependents
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists options(ports_do_dependents)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[dict exists $options ports_do_dependents]} {
</span> # We do dependents ..
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set options(ports_nodeps) 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dict set options ports_nodeps 1
</span>
# Get names from all registry entries in advance, since the
# recursive upgrade calls could invalidate them.
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4502,7 +4454,7 @@ proc macports::_upgrade {portname dspec variationslist optionslist {depscachenam
</span> }
foreach mpname $dependents_names {
if {![info exists depscache(port:$mpname)]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set status [macports::_upgrade $mpname port:$mpname $variationslist [array get options] depscache]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set status [macports::_upgrade $mpname port:$mpname $called_variations $options depscache]
</span> if {$status != 0 && $status != 2 && ![ui_isset ports_processall]} {
_upgrade_cleanup
return $status
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4517,7 +4469,7 @@ proc macports::_upgrade {portname dspec variationslist optionslist {depscachenam
</span> set workername [ditem_key $mport workername]
if {$will_build} {
if {$already_installed
<span style='display:block; white-space:pre;background:#ffe0e0;'>- && ([info exists options(ports_upgrade_force)] || $build_override == 1)} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ && ([dict exists $options ports_upgrade_force] || $build_override == 1)} {
</span> # Tell archivefetch/unarchive not to use the installed archive, i.e. a
# fresh one will be either fetched or built locally.
# Ideally this would be done in the interp_options when we mportopen,
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4529,7 +4481,7 @@ proc macports::_upgrade {portname dspec variationslist optionslist {depscachenam
</span> # new copy ready but not yet installed, so we can safely uninstall the
# existing one.
set archivefetch_failed 1
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists interp_options(ports_source_only)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![dict exists $interp_options ports_source_only]} {
</span> if {[catch {mportexec $mport archivefetch} result]} {
ui_debug $::errorInfo
} elseif {$result == 0 && [$workername eval [list find_portarchive_path]] ne ""} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4537,7 +4489,7 @@ proc macports::_upgrade {portname dspec variationslist optionslist {depscachenam
</span> }
}
if {$archivefetch_failed} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists interp_options(ports_binary_only)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[dict exists $interp_options ports_binary_only]} {
</span> _upgrade_cleanup
return 1
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4564,7 +4516,7 @@ proc macports::_upgrade {portname dspec variationslist optionslist {depscachenam
</span> }
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- array unset interp_options
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ unset interp_options
</span>
# check if the startupitem is loaded, so we can load again it after upgrading
# (deactivating the old version will unload the startupitem)
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4575,18 +4527,18 @@ proc macports::_upgrade {portname dspec variationslist optionslist {depscachenam
</span>
# are we installing an existing version due to force or epoch override?
if {$already_installed
<span style='display:block; white-space:pre;background:#ffe0e0;'>- && ([info exists options(ports_upgrade_force)] || $build_override == 1)} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_debug "Uninstalling $newname ${version_in_tree}_${revision_in_tree}$portinfo(canonical_active_variants)"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ && ([dict exists $options ports_upgrade_force] || $build_override == 1)} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug "Uninstalling $newname ${version_in_tree}_${revision_in_tree}[dict get $portinfo canonical_active_variants]"
</span> # we have to force the uninstall in case of dependents
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set force_cur [info exists options(ports_force)]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set options(ports_force) yes
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set newregref [registry::entry open $newname $version_in_tree $revision_in_tree $portinfo(canonical_active_variants) ""]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set force_cur [dict exists $options ports_force]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dict set options ports_force yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set newregref [registry::entry open $newname $version_in_tree $revision_in_tree [dict get $portinfo canonical_active_variants] ""]
</span> if {$is_dryrun} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg "Skipping uninstall $newname @${version_in_tree}_${revision_in_tree}$portinfo(canonical_active_variants) (dry run)"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {![registry::run_target $newregref uninstall [array get options]]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- && [catch {registry_uninstall::uninstall $newname $version_in_tree $revision_in_tree $portinfo(canonical_active_variants) [array get options]} result]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "Skipping uninstall $newname @${version_in_tree}_${revision_in_tree}[dict get $portinfo canonical_active_variants] (dry run)"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } elseif {![registry::run_target $newregref uninstall $options]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ && [catch {registry_uninstall::uninstall $newname $version_in_tree $revision_in_tree [dict get $portinfo canonical_active_variants] $options} result]} {
</span> ui_debug $::errorInfo
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_error "Uninstall $newname ${version_in_tree}_${revision_in_tree}$portinfo(canonical_active_variants) failed: $result"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_error "Uninstall $newname ${version_in_tree}_${revision_in_tree}[dict get $portinfo canonical_active_variants] failed: $result"
</span> _upgrade_cleanup
return 1
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4595,33 +4547,33 @@ proc macports::_upgrade {portname dspec variationslist optionslist {depscachenam
</span> unset newregref
}
if {!$force_cur} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- unset options(ports_force)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dict unset options ports_force
</span> }
if {$anyactive && $version_in_tree eq $version_active && $revision_in_tree == $revision_active
<span style='display:block; white-space:pre;background:#ffe0e0;'>- && $portinfo(canonical_active_variants) eq $variant_active && $portname eq $newname} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ && [dict get $portinfo canonical_active_variants] eq $variant_active && $portname eq $newname} {
</span> set anyactive no
}
}
if {$anyactive && $portname ne $newname} {
# replaced_by in effect, deactivate the old port
# we have to force the deactivate in case of dependents
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set force_cur [info exists options(ports_force)]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set options(ports_force) yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set force_cur [dict exists $options ports_force]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dict set options ports_force yes
</span> if {$is_dryrun} {
ui_msg "Skipping deactivate $portname @${version_active}_${revision_active}$variant_active (dry run)"
<span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {![registry::run_target $regref deactivate [array get options]]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- && [catch {portimage::deactivate $portname $version_active $revision_active $variant_active [array get options]} result]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } elseif {![registry::run_target $regref deactivate $options]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ && [catch {portimage::deactivate $portname $version_active $revision_active $variant_active $options} result]} {
</span> ui_debug $::errorInfo
ui_error "Deactivating $portname @${version_active}_${revision_active}$variant_active failed: $result"
_upgrade_cleanup
return 1
}
if {!$force_cur} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- unset options(ports_force)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dict unset options ports_force
</span> }
set anyactive no
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists options(port_uninstall_old)] && $portname eq $newname} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[dict exists $options port_uninstall_old] && $portname eq $newname} {
</span> # uninstalling now could fail due to dependents when not forced,
# because the new version is not installed
set uninstall_later yes
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4631,7 +4583,7 @@ proc macports::_upgrade {portname dspec variationslist optionslist {depscachenam
</span> if {$anyactive} {
ui_msg "Skipping deactivate $portname @${version_active}_${revision_active}$variant_active (dry run)"
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg "Skipping activate $newname @${version_in_tree}_${revision_in_tree}$portinfo(canonical_active_variants) (dry run)"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "Skipping activate $newname @${version_in_tree}_${revision_in_tree}[dict get $portinfo canonical_active_variants] (dry run)"
</span> } else {
set failed 0
if {[catch {mportexec $mport activate} result]} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4641,7 +4593,7 @@ proc macports::_upgrade {portname dspec variationslist optionslist {depscachenam
</span> set failed 1
}
if {$failed} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_error "Couldn't activate $newname ${version_in_tree}_${revision_in_tree}$portinfo(canonical_active_variants): $result"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_error "Couldn't activate $newname ${version_in_tree}_${revision_in_tree}[dict get $portinfo canonical_active_variants]: $result"
</span> _upgrade_cleanup
return 1
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4658,13 +4610,13 @@ proc macports::_upgrade {portname dspec variationslist optionslist {depscachenam
</span> }
# Check if we have to do dependents
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists options(ports_do_dependents)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[dict exists $options ports_do_dependents]} {
</span> # We do dependents ..
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set options(ports_nodeps) 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dict set options ports_nodeps 1
</span>
if {$portname ne $newname} {
if {![info exists newregref]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set newregref [registry::entry open $newname $version_in_tree $revision_in_tree $portinfo(canonical_active_variants) ""]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set newregref [registry::entry open $newname $version_in_tree $revision_in_tree [dict get $portinfo canonical_active_variants] ""]
</span> }
lappend dependents_list {*}[$newregref dependents]
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4677,7 +4629,7 @@ proc macports::_upgrade {portname dspec variationslist optionslist {depscachenam
</span> }
foreach mpname $dependents_names {
if {![info exists depscache(port:$mpname)]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set status [macports::_upgrade $mpname port:$mpname $variationslist [array get options] depscache]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set status [macports::_upgrade $mpname port:$mpname $called_variations $options depscache]
</span> if {$status != 0 && $status != 2 && ![ui_isset ports_processall]} {
_upgrade_cleanup
return $status
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4695,14 +4647,14 @@ proc macports::_upgrade {portname dspec variationslist optionslist {depscachenam
</span> set version [$i version]
set revision [$i revision]
set variant [$i variants]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$version eq $version_in_tree && $revision == $revision_in_tree && $variant eq $portinfo(canonical_active_variants) && $portname eq $newname} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$version eq $version_in_tree && $revision == $revision_in_tree && $variant eq [dict get $portinfo canonical_active_variants] && $portname eq $newname} {
</span> continue
}
ui_debug "Uninstalling $portname ${version}_${revision}$variant"
if {$is_dryrun} {
ui_msg "Skipping uninstall $portname @${version}_${revision}$variant (dry run)"
<span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {![registry::run_target $i uninstall $optionslist]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- && [catch {registry_uninstall::uninstall $portname $version $revision $variant $optionslist} result]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } elseif {![registry::run_target $i uninstall $options]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ && [catch {registry_uninstall::uninstall $portname $version $revision $variant $options} result]} {
</span> ui_debug $::errorInfo
# replaced_by can mean that we try to uninstall all versions of the old port, so handle errors due to dependents
if {$result ne "Please uninstall the ports that depend on $portname first." && ![ui_isset ports_processall]} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4726,23 +4678,23 @@ proc macports::_mport_open_with_archcheck {porturl depspec dependent_mport optio
</span> ui_error "Unable to open port ($depspec): $result"
error "mportopen failed"
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- array set portinfo [mportinfo $mport]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set portinfo [mportinfo $mport]
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists portinfo(installs_libs)] && !$portinfo(installs_libs)} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[dict exists $portinfo installs_libs] && ![dict get $portinfo installs_libs]} {
</span> return $mport
}
set skip_archcheck [_mportkey $dependent_mport depends_skip_archcheck]
set required_archs [_mport_archs $dependent_mport]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[lsearch -exact -nocase $skip_archcheck $portinfo(name)] >= 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[lsearch -exact -nocase $skip_archcheck [dict get $portinfo name]] >= 0
</span> || [_mport_supports_archs $mport $required_archs]} {
return $mport
}
# Check if the dependent used a dep type that needs matching archs
<span style='display:block; white-space:pre;background:#ffe0e0;'>- array set dependent_portinfo [mportinfo $dependent_mport]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set dependent_portinfo [mportinfo $dependent_mport]
</span> set archcheck_needed 0
foreach dtype ${macports::archcheck_install_dep_types} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists dependent_portinfo($dtype)]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- && [lsearch -exact -nocase $dependent_portinfo($dtype) $depspec] >= 0} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[dict exists $dependent_portinfo $dtype]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ && [lsearch -exact -nocase [dict get $dependent_portinfo $dtype] $depspec] >= 0} {
</span> set archcheck_needed 1
break
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4752,21 +4704,21 @@ proc macports::_mport_open_with_archcheck {porturl depspec dependent_mport optio
</span> }
# Reopen with +universal if possible
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set has_universal [expr {[info exists portinfo(variants)] && "universal" in $portinfo(variants)}]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {"universal" ni $variations && $has_universal
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set has_universal [expr {[dict exists $portinfo variants] && "universal" in [dict get $portinfo variants]}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![dict exists $variations universal] && $has_universal
</span> && [llength [_mport_archs $mport]] < 2} {
mportclose $mport
<span style='display:block; white-space:pre;background:#ffe0e0;'>- lappend variations universal +
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dict set variations universal +
</span> if {[catch {set mport [mportopen $porturl $options $variations]} result]} {
ui_debug $::errorInfo
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_error "Unable to open port $portinfo(name): $result"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_error "Unable to open port [dict get $portinfo name]: $result"
</span> error "mportopen failed"
}
if {[_mport_supports_archs $mport $required_archs]} {
return $mport
}
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- _explain_arch_mismatch $dependent_portinfo(name) $portinfo(name) $required_archs [_mportkey $mport supported_archs] $has_universal
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ _explain_arch_mismatch [dict get $dependent_portinfo name] [dict get $portinfo name] $required_archs [_mportkey $mport supported_archs] $has_universal
</span> error "architecture mismatch"
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4799,11 +4751,9 @@ proc macports::_upgrade_cleanup {} {
</span> # upgrade_dependencies: helper proc for upgrade
# Calls upgrade on each dependency listed in the PortInfo.
# Uses upvar to access the variables.
<span style='display:block; white-space:pre;background:#ffe0e0;'>-proc macports::_upgrade_dependencies {portinfoname depscachename variationslistname optionsname {build_needed no}} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- upvar $portinfoname portinfo $depscachename depscache \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- $variationslistname variationslist \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- $optionsname options
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- upvar mport parentmport
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+proc macports::_upgrade_dependencies {portinfo depscachename variations options {build_needed no}} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ upvar $depscachename depscache \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ mport parentmport
</span>
# If we're following dependents, we only want to follow this port's
# dependents, not those of all its dependencies. Otherwise, we would
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4811,11 +4761,8 @@ proc macports::_upgrade_dependencies {portinfoname depscachename variationslistn
</span> # where n is the number of dependencies this port has, since this port
# is of course a dependent of each of its dependencies. Plus the
# dependencies could have any number of unrelated dependents.
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # So we save whether we're following dependents, unset the option
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # while doing the dependencies, and restore it afterwards.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set saved_do_dependents [info exists options(ports_do_dependents)]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- unset -nocomplain options(ports_do_dependents)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # So we unset the option while doing the dependencies.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dict unset options ports_do_dependents
</span>
set parentworker [ditem_key $parentmport workername]
# each required dep type is upgraded
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4827,69 +4774,67 @@ proc macports::_upgrade_dependencies {portinfoname depscachename variationslistn
</span>
set status 0
foreach dtype $dtypes {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists portinfo($dtype)]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach i $portinfo($dtype) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[dict exists $portinfo $dtype]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach i [dict get $portinfo $dtype] {
</span> set d [$parentworker eval [list _get_dep_port $i]]
if {$d eq ""} {
set d [lindex [split $i :] end]
}
if {![info exists depscache(port:$d)] && ![info exists depscache($i)]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set status [macports::_upgrade $d $i $variationslist [array get options] depscache]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set status [macports::_upgrade $d $i $variations $options depscache]
</span> if {$status != 0 && $status != 2 && ![ui_isset ports_processall]} break
}
}
}
if {$status != 0 && $status != 2 && ![ui_isset ports_processall]} break
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- # restore dependent-following to its former value
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$saved_do_dependents} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set options(ports_do_dependents) yes
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span> return $status
}
# update certain metadata if changed in the portfile since installation
proc macports::_upgrade_metadata {mport regref is_dryrun} {
set workername [ditem_key $mport workername]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- array set portinfo [mportinfo $mport]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set portinfo [mportinfo $mport]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set portname [dict get $portinfo name]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set tree_verstring "[dict get $portinfo version]_[dict get $portinfo revision][dict get $portinfo canonical_active_variants]"
</span>
# Check that the version in the ports tree isn't too different
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$portinfo(version) ne [$regref version]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- || $portinfo(revision) != [$regref revision]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- || $portinfo(canonical_active_variants) ne [$regref variants]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_debug "$portinfo(name): Registry '[$regref version]_[$regref revision][$regref variants]' doesn't match '$portinfo(version)_$portinfo(revision)$portinfo(canonical_active_variants)'"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_debug "Not attempting to update metadata for $portinfo(name)"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[dict get $portinfo version] ne [$regref version]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ || [dict get $portinfo revision] != [$regref revision]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ || [dict get $portinfo canonical_active_variants] ne [$regref variants]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug "${portname}: Registry '[$regref version]_[$regref revision][$regref variants]' doesn't match '$tree_verstring'"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug "Not attempting to update metadata for $portname"
</span> return
}
# Update runtime dependencies if needed.
# First get the deps from the Portfile and from the registry.
<span style='display:block; white-space:pre;background:#ffe0e0;'>- array set deps_in_tree {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set deps_in_tree [dict create]
</span> foreach dtype [list depends_lib depends_run] {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists portinfo($dtype)]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach dep $portinfo($dtype) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[dict exists $portinfo $dtype]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach dep [dict get $portinfo $dtype] {
</span> set dname [$workername eval [list _get_dep_port $dep]]
if {$dname ne ""} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set deps_in_tree($dname) 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dict set deps_in_tree $dname 1
</span> }
}
}
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- array set deps_in_reg {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set deps_in_reg [dict create]
</span> foreach dep_regref [$regref dependencies] {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set deps_in_reg([$dep_regref name]) 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dict set deps_in_reg [$dep_regref name] 1
</span> }
# Find the differences.
set removed [list]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach d [array names deps_in_reg] {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists deps_in_tree($d)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach d [dict keys $deps_in_reg] {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![dict exists $deps_in_tree $d]} {
</span> lappend removed $d
}
}
set added [list]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach d [array names deps_in_tree] {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists deps_in_reg($d)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach d [dict keys $deps_in_tree] {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![dict exists $deps_in_reg $d]} {
</span> lappend added $d
}
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4897,9 +4842,9 @@ proc macports::_upgrade_metadata {mport regref is_dryrun} {
</span> # Update the registry.
if {[llength $removed] > 0 || [llength $added] > 0} {
if {$is_dryrun} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_info "Not updating dependencies for $portinfo(name) @$portinfo(version)_$portinfo(revision)$portinfo(canonical_active_variants) (dry run)"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_info "Not updating dependencies for $portname @$tree_verstring (dry run)"
</span> } else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_info "Updating dependencies for $portinfo(name) @$portinfo(version)_$portinfo(revision)$portinfo(canonical_active_variants)"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_info "Updating dependencies for $portname @$tree_verstring"
</span> if {[llength $removed] > 0} {
registry::delete_dependencies $regref $removed
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4919,9 +4864,9 @@ proc macports::_upgrade_metadata {mport regref is_dryrun} {
</span> lassign [$workername eval [list _get_compatible_platform]] os_platform os_major
if {$os_major eq "any" && $os_major ne [$regref os_major]} {
if {$is_dryrun} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_info "Not updating platform for $portinfo(name) @$portinfo(version)_$portinfo(revision)$portinfo(canonical_active_variants) (dry run)"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_info "Not updating platform for $portname @$tree_verstring (dry run)"
</span> } else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_info "Updating platform for $portinfo(name) @$portinfo(version)_$portinfo(revision)$portinfo(canonical_active_variants)"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_info "Updating platform for $portname @$tree_verstring"
</span> registry::write {
$regref os_major $os_major
# No need to check for a completely different platform, since
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4938,9 +4883,9 @@ proc macports::_upgrade_metadata {mport regref is_dryrun} {
</span> set archs [$workername eval [list get_canonical_archs]]
if {$archs eq "noarch" && $archs ne [$regref archs]} {
if {$is_dryrun} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_info "Not updating archs for $portinfo(name) @$portinfo(version)_$portinfo(revision)$portinfo(canonical_active_variants) (dry run)"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_info "Not updating archs for $portname @$tree_verstring (dry run)"
</span> } else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_info "Updating archs for $portinfo(name) @$portinfo(version)_$portinfo(revision)$portinfo(canonical_active_variants)"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_info "Updating archs for $portname @$tree_verstring"
</span> registry::write {
$regref archs $archs
}
</pre><pre style='margin:0'>
</pre>