<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/d91d3b7803863a48a5bd26bf810d970323cee88a">https://github.com/macports/macports-base/commit/d91d3b7803863a48a5bd26bf810d970323cee88a</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit d91d3b7803863a48a5bd26bf810d970323cee88a
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Thu Mar 7 07:02:39 2024 +1100
<span style='display:block; white-space:pre;color:#404040;'> macports1.0: global cleanup
</span>---
src/macports1.0/macports.tcl | 941 +++++++++++++++++++-----------------
src/macports1.0/reclaim.tcl | 97 ++--
src/macports1.0/selfupdate.tcl | 50 +-
src/macports1.0/tests/macports.test | 3 +-
src/port/portindex.tcl | 2 +-
5 files changed, 582 insertions(+), 511 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 3fd63e1f4..846518370 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;'>@@ -94,6 +94,17 @@ namespace eval macports {
</span> variable ui_prefix {---> }
variable tool_path_cache [dict create]
<span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable getprotocol_re {(?x)([^:]+)://.+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable file_porturl_re {^file://(.*)}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable source_is_snapshot_re {^((?:https?|ftp|rsync)://.+/)(.+\.(tar\.gz|tar\.bz2|tar))$}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # All valid depends_* options
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable all_dep_types [list depends_fetch depends_extract depends_patch depends_build depends_lib depends_run depends_test]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Which depends_* types need to have matching archs when installing
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable archcheck_install_dep_types [list depends_build depends_lib depends_run]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Which depends_* types need to have matching archs if used
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable archcheck_dep_types [list {*}${archcheck_install_dep_types} depends_test]
</span> }
##
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -130,55 +141,62 @@ proc macports::version {} {
</span>
# ui_options accessor
proc macports::ui_isset {val} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists macports::ui_options($val)]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return [string is true -strict $macports::ui_options($val)]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable ui_options
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[info exists ui_options($val)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return [string is true -strict $ui_options($val)]
</span> }
return 0
}
# Return all current ui options
proc macports::get_ui_options {} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- return [array get macports::ui_options]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable ui_options
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return [array get ui_options]
</span> }
# Set all ui options
# Takes a value previously returned by get_ui_options
proc macports::set_ui_options {opts} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::ui_options
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- array unset macports::ui_options
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- array set macports::ui_options $opts
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable ui_options; variable portverbose
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ array unset ui_options
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ array set ui_options $opts
</span> # This is also a config file option, so needs special handling
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists macports::ui_options(ports_verbose)]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::portverbose $macports::ui_options(ports_verbose)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[info exists ui_options(ports_verbose)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set portverbose $ui_options(ports_verbose)
</span> } else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::portverbose $macports::portverbose_frozen
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable portverbose_frozen
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set portverbose $portverbose_frozen
</span> }
}
# global_options accessor
proc macports::global_option_isset {val} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists macports::global_options($val)]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return [string is true -strict $macports::global_options($val)]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable global_options
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[info exists global_options($val)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return [string is true -strict $global_options($val)]
</span> }
return 0
}
# Return all current global options
proc macports::get_global_options {} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- return [array get macports::global_options]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable global_options
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return [array get global_options]
</span> }
# Set all global options
# Takes a value previously returned by get_global_options
proc macports::set_global_options {opts} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::global_options
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- array unset macports::global_options
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- array set macports::global_options $opts
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable global_options
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ array unset global_options
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ array set global_options $opts
</span> # Options that can also be set in the config file need special handling
foreach {opt var} {ports_autoclean portautoclean ports_trace porttrace} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists macports::global_options($opt)]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::$var $macports::global_options($opt)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable $var
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[info exists global_options($opt)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set $var $global_options($opt)
</span> } else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::$var [set macports::${var}_frozen]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable ${var}_frozen
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set $var [set ${var}_frozen]
</span> }
}
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -197,41 +215,38 @@ proc macports::init_logging {mport} {
</span> }
proc macports::ch_logging {mport} {
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable debuglogname; variable debuglog
</span> set portinfo [mportinfo $mport]
set portname [dict get $portinfo name]
set portpath [ditem_key $mport portpath]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set logname [macports::getportlogpath $portpath $portname]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- file mkdir $logname
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set logname [file join $logname main.log]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set ::debuglogname $logname
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set logdir [macports::getportlogpath $portpath $portname]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ file mkdir $logdir
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set debuglogname [file join $logdir main.log]
</span>
# Append to the file if it already exists
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set ::debuglog [open $::debuglogname a]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- puts $::debuglog version:1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set debuglog [open $debuglogname a]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ puts $debuglog version:1
</span>
ui_debug "Starting logging for $portname @[dict get $portinfo version]_[dict get $portinfo revision][dict get $portinfo canonical_active_variants]"
}
# log platform information
proc macports::_log_sysinfo {} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::current_phase \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- macports::os_platform macports::os_subplatform \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- macports::os_version macports::os_major macports::os_minor \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- macports::os_endian macports::os_arch \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- macports::macos_version macports::macosx_sdk_version macports::macosx_deployment_target \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- macports::xcodeversion macports::xcodecltversion \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- tcl_platform
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach v [list current_phase os_platform os_subplatform os_version \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ os_arch macos_version macosx_sdk_version \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macosx_deployment_target xcodeversion xcodecltversion] {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable $v
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set previous_phase ${macports::current_phase}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::current_phase "sysinfo"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set previous_phase ${current_phase}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set current_phase "sysinfo"
</span>
if {$os_platform eq "darwin"} {
if {$os_subplatform eq "macosx"} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[vercmp $macos_version 10.12] >= 0} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[vercmp $macos_version >= 10.12] } {
</span> set os_version_string "macOS ${macos_version}"
<span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {[vercmp $macos_version 10.8] >= 0} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } elseif {[vercmp $macos_version >= 10.8]} {
</span> set os_version_string "OS X ${macos_version}"
} else {
set os_version_string "Mac OS X ${macos_version}"
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -240,6 +255,7 @@ proc macports::_log_sysinfo {} {
</span> set os_version_string "PureDarwin ${os_version}"
}
} else {
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ global tcl_platform
</span> # use capitalized platform name
set os_version_string "$tcl_platform(os) ${os_version}"
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -252,47 +268,50 @@ proc macports::_log_sysinfo {} {
</span> ui_debug "MACOSX_DEPLOYMENT_TARGET: ${macosx_deployment_target}"
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::current_phase $previous_phase
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set current_phase $previous_phase
</span> }
proc macports::push_log {mport} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists ::logenabled]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable logenabled; variable logstack
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable debuglog; variable debuglogname
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![info exists logenabled]} {
</span> if {[macports::init_logging $mport] == 0} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set ::logenabled yes
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set ::logstack [list [list $::debuglog $::debuglogname]]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set logenabled yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set logstack [list [list $debuglog $debuglogname]]
</span> return
} else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set ::logenabled no
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set logenabled no
</span> }
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$::logenabled} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$logenabled} {
</span> if {[macports::init_logging $mport] == 0} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- lappend ::logstack [list $::debuglog $::debuglogname]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lappend logstack [list $debuglog $debuglogname]
</span> }
}
}
proc macports::pop_log {} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists ::logenabled]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable logenabled
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![info exists logenabled]} {
</span> return -code error "pop_log called before push_log"
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$::logenabled && [llength $::logstack] > 0} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- close $::debuglog
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set ::logstack [lreplace ${::logstack}[set ::logstack {}] end end]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[llength $::logstack] > 0} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set top [lindex $::logstack end]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set ::debuglog [lindex $top 0]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set ::debuglogname [lindex $top 1]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable logstack
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$logenabled && [llength $logstack] > 0} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable debuglog; variable debuglogname
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ close $debuglog
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set logstack [lreplace ${logstack}[set logstack {}] end end]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[llength $logstack] > 0} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lassign [lindex $logstack end] debuglog debuglogname
</span> } else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- unset ::debuglog
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- unset ::debuglogname
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ unset debuglog
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ unset debuglogname
</span> }
}
}
proc set_phase {phase} {
global macports::current_phase
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::current_phase $phase
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set current_phase $phase
</span> if {$phase ne "main"} {
set cur_time [clock format [clock seconds] -format {%+}]
ui_debug "$phase phase started at $cur_time"
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -300,7 +319,7 @@ proc set_phase {phase} {
</span> }
proc ui_message {priority prefix args} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::channels macports::current_phase
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global macports::channels macports::current_phase macports::debuglog
</span>
#
# validate $args
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -319,7 +338,7 @@ proc ui_message {priority prefix args} {
</span> }
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach chan $macports::channels($priority) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach chan $channels($priority) {
</span> if {[lindex $args 0] eq "-nonewline"} {
puts -nonewline $chan $prefix[lindex $args 1]
} else {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -327,17 +346,16 @@ proc ui_message {priority prefix args} {
</span> }
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists ::debuglog]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set chan $::debuglog
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists macports::current_phase]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set phase $macports::current_phase
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[info exists debuglog]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[info exists current_phase]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set phase $current_phase
</span> }
set strprefix ":${priority}:$phase "
if {[lindex $args 0] eq "-nonewline"} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- puts -nonewline $chan $strprefix[lindex $args 1]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ puts -nonewline $debuglog $strprefix[lindex $args 1]
</span> } else {
foreach str [split [lindex $args 0] "\n"] {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- puts $chan $strprefix$str
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ puts $debuglog $strprefix$str
</span> }
}
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -345,13 +363,14 @@ proc ui_message {priority prefix args} {
</span>
# Init (or re-init) all ui channels
proc macports::ui_init_all {} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach priority $macports::ui_priorities {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable ui_priorities
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach priority $ui_priorities {
</span> ui_init $priority
}
}
proc macports::ui_init {priority args} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::channels
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable channels
</span> # Get the list of channels.
if {[llength [info commands ui_channels]] > 0} {
set channels($priority) [ui_channels $priority]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -431,10 +450,10 @@ proc macports::ui_channels_default {priority} {
</span> }
proc ui_warn_once {id msg} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- variable macports::warning_done
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists macports::warning_done($id)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global macports::warning_done
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![info exists warning_done($id)]} {
</span> ui_warn $msg
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::warning_done($id) 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set warning_done($id) 1
</span> }
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -472,7 +491,7 @@ proc macports::binaryInPath {prog} {
</span>
# deferred option processing
proc macports::getoption {name} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::$name
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable $name
</span> return [set $name]
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -643,9 +662,9 @@ proc macports::setxcodeinfo {name1 name2 op} {
</span>
# deferred calculation of developer_dir
proc macports::set_developer_dir {name1 name2 op} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::developer_dir macports::os_major macports::xcodeversion
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable developer_dir
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- trace remove variable macports::developer_dir read macports::set_developer_dir
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ trace remove variable developer_dir read macports::set_developer_dir
</span>
if {[info exists developer_dir]} {
return
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -660,7 +679,7 @@ proc macports::set_developer_dir {name1 name2 op} {
</span> macports_try -pass_signal {
set devdir [exec -ignorestderr $xcodeselect -print-path 2> /dev/null]
if {[_is_valid_developer_dir $devdir]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::developer_dir $devdir
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set developer_dir $devdir
</span> return
}
} on error {} {}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -724,13 +743,13 @@ proc macports::set_developer_dir {name1 name2 op} {
</span> } on error {} {}
# Try the default
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable os_major
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable xcodeversion
</span> if {$os_major >= 11 && [vercmp $xcodeversion 4.3] >= 0} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set devdir /Applications/Xcode.app/Contents/Developer
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set developer_dir /Applications/Xcode.app/Contents/Developer
</span> } else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set devdir /Developer
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set developer_dir /Developer
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::developer_dir $devdir
</span> }
proc macports::_is_valid_developer_dir {dir} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -754,9 +773,9 @@ proc macports::_is_valid_developer_dir {dir} {
</span>
# deferred calculation of xcodecltversion
proc macports::set_xcodecltversion {name1 name2 op} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::xcodecltversion
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable xcodecltversion
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- trace remove variable macports::xcodecltversion read macports::set_xcodecltversion
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ trace remove variable xcodecltversion read macports::set_xcodecltversion
</span>
if {[info exists xcodecltversion]} {
return
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -766,7 +785,7 @@ proc macports::set_xcodecltversion {name1 name2 op} {
</span> set pkgnames [list CLTools_Executables CLTools_Base DeveloperToolsCLI DeveloperToolsCLILeo]
if {[catch {exec -ignorestderr /usr/sbin/pkgutil --pkgs=com\\.apple\\.pkg\\.([join $pkgnames |]) 2> /dev/null} result]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::xcodecltversion none
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set xcodecltversion none
</span> return
}
set pkgs [split $result \n]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -779,7 +798,7 @@ proc macports::set_xcodecltversion {name1 name2 op} {
</span> foreach line [split $result \n] {
lassign [split $line] name val
if {$name eq "version:"} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::xcodecltversion $val
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set xcodecltversion $val
</span> return
}
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -789,13 +808,13 @@ proc macports::set_xcodecltversion {name1 name2 op} {
</span> }
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::xcodecltversion none
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set xcodecltversion none
</span> }
proc macports::set_xcode_license_unaccepted {name1 name2 op} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::xcode_license_unaccepted
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable xcode_license_unaccepted
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- trace remove variable macports::xcode_license_unaccepted read macports::set_xcode_license_unaccepted
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ trace remove variable xcode_license_unaccepted read macports::set_xcode_license_unaccepted
</span>
if {[info exists xcode_license_unaccepted]} {
return
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -804,60 +823,36 @@ proc macports::set_xcode_license_unaccepted {name1 name2 op} {
</span> catch {exec [findBinary xcrun $macports::autoconf::xcrun_path] clang 2>@1} output
set output [join [lrange [split $output "\n"] 0 end-1] "\n"]
if {[string match -nocase "*license*" $output]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::xcode_license_unaccepted yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set xcode_license_unaccepted yes
</span> return
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::xcode_license_unaccepted no
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set xcode_license_unaccepted no
</span> }
proc mportinit {{up_ui_options {}} {up_options {}} {up_variations {}}} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- # Disable unknown(n)'s behavior of running unknown commands in the system
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # shell
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set ::auto_noexec yes
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$up_ui_options eq {}} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- array set macports::ui_options {}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- upvar $up_ui_options temp_ui_options
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- array set macports::ui_options [array get temp_ui_options]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$up_options eq {}} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- array set macports::global_options {}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- upvar $up_options temp_options
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- array set macports::global_options [array get temp_options]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$up_variations eq {}} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- array set variations {}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- upvar $up_variations variations
</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;'>- # Initialize ui_* channels
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- macports::ui_init_all
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- package require Pextlib 1.0
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- package require registry 1.0
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- package require registry2 2.0
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- package require machista 1.0
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- global auto_path env tcl_platform \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global auto_noexec env tcl_platform \
</span> macports::autoconf::macports_conf_path \
macports::macports_user_dir \
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports::user_home \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports::user_path \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports::sudo_user \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports::user_ssh_auth_sock \
</span> macports::bootstrap_options \
macports::user_options \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- macports::portconf \
</span> macports::portsharepath \
macports::registry.format \
macports::registry.path \
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports::rsync_dir \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports::rsync_options \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports::rsync_server \
</span> macports::sources \
macports::sources_default \
macports::destroot_umask \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- macports::prefix \
</span> macports::macportsuser \
macports::prefix_frozen \
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports::applications_dir \
</span> macports::applications_dir_frozen \
macports::frameworks_dir_frozen \
macports::xcodebuildcmd \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -871,6 +866,25 @@ proc mportinit {{up_ui_options {}} {up_options {}} {up_variations {}}} {
</span> macports::configurepipe \
macports::buildnicevalue \
macports::buildmakejobs \
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports::host_blacklist \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports::preferred_hosts \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports::keeplogs \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports::place_worksymlink \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports::revupgrade_autorun \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports::revupgrade_mode \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports::sandbox_enable \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports::sandbox_network \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports::startupitem_autostart \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports::startupitem_install \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports::startupitem_type \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports::buildfromsource \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports::portarchivetype \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports::portautoclean \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports::portautoclean_frozen \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports::porttrace \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports::porttrace_frozen \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports::portverbose \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports::portverbose_frozen \
</span> macports::universal_archs \
macports::build_arch \
macports::os_arch \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -886,11 +900,44 @@ proc mportinit {{up_ui_options {}} {up_options {}} {up_variations {}}} {
</span> macports::macosx_sdk_version \
macports::macosx_deployment_target \
macports::archivefetch_pubkeys \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- macports::ping_cache \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- macports::host_cache \
</span> macports::delete_la_files \
macports::cxx_stdlib \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- macports::hfscompression
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports::hfscompression \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports::host_cache \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports::porturl_prefix_map \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports::ui_options \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports::global_options \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports::global_variations
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Disable unknown(n)'s behavior of running unknown commands in the system
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # shell
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set auto_noexec yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$up_ui_options eq {}} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ array set ui_options {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ upvar $up_ui_options temp_ui_options
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ array set ui_options [array get temp_ui_options]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$up_options eq {}} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ array set global_options {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ upvar $up_options temp_options
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ array set global_options [array get temp_options]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$up_variations eq {}} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ array set variations {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ upvar $up_variations variations
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Initialize ui_* channels
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports::ui_init_all
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ package require Pextlib 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ package require registry 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ package require registry2 2.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ package require machista 1.0
</span>
# Set the system encoding to utf-8
encoding system utf-8
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -963,30 +1010,32 @@ proc mportinit {{up_ui_options {}} {up_options {}} {up_variations {}}} {
</span> # Ensure that the macports user directory (i.e. ~/.macports) exists if HOME is defined.
# Also save $HOME for later use before replacing it with our own.
if {[info exists env(HOME)]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::user_home $env(HOME)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::macports_user_dir [file normalize $macports::autoconf::macports_user_dir]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set user_home $env(HOME)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # XXX Relying on file normalize to do tilde expansion for
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # macports::autoconf::macports_user_dir will not work in Tcl 9.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set macports_user_dir [file normalize $macports::autoconf::macports_user_dir]
</span> } elseif {[info exists env(SUDO_USER)] && $os_platform eq "darwin"} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::user_home [exec -ignorestderr dscl -q . -read /Users/$env(SUDO_USER) NFSHomeDirectory | cut -d ' ' -f 2]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::macports_user_dir [file join $macports::user_home [string range $macports::autoconf::macports_user_dir 2 end]]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set user_home [exec -ignorestderr dscl -q . -read /Users/$env(SUDO_USER) NFSHomeDirectory | cut -d ' ' -f 2]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set macports_user_dir [file join $user_home [string range $macports::autoconf::macports_user_dir 2 end]]
</span> } elseif {[exec id -u] != 0 && $os_platform eq "darwin"} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::user_home [exec -ignorestderr dscl -q . -read /Users/[exec -ignorestderr id -un 2> /dev/null] NFSHomeDirectory | cut -d ' ' -f 2]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::macports_user_dir [file join $macports::user_home [string range $macports::autoconf::macports_user_dir 2 end]]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set user_home [exec -ignorestderr dscl -q . -read /Users/[exec -ignorestderr id -un 2> /dev/null] NFSHomeDirectory | cut -d ' ' -f 2]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set macports_user_dir [file join $user_home [string range $macports::autoconf::macports_user_dir 2 end]]
</span> } else {
# Otherwise define the user directory as a directory that will never exist
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::macports_user_dir /dev/null/NO_HOME_DIR
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::user_home /dev/null/NO_HOME_DIR
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set macports_user_dir /dev/null/NO_HOME_DIR
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set user_home /dev/null/NO_HOME_DIR
</span> }
# Save the path for future processing
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::user_path $env(PATH)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set user_path $env(PATH)
</span> # Likewise any SUDO_USER
if {[info exists env(SUDO_USER)]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::sudo_user $env(SUDO_USER)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set sudo_user $env(SUDO_USER)
</span> }
# Save SSH_AUTH_SOCK for ports tree sync
if {[info exists env(SSH_AUTH_SOCK)]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::user_ssh_auth_sock $env(SSH_AUTH_SOCK)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set user_ssh_auth_sock $env(SSH_AUTH_SOCK)
</span> }
# Configure the search path for configuration files
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1004,7 +1053,6 @@ proc mportinit {{up_ui_options {}} {up_options {}} {up_variations {}}} {
</span> set conf_option_re {^(\w+)([ \t]+(.*))?$}
foreach file $conf_files {
if {[file exists $file]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set portconf $file
</span> set fd [open $file r]
while {[gets $fd line] >= 0} {
if {[regexp $conf_option_re $line match option ignore val] == 1} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1032,8 +1080,8 @@ proc mportinit {{up_ui_options {}} {up_options {}} {up_variations {}}} {
</span> while {[gets $fd line] >= 0} {
if {[regexp $conf_option_re $line match option ignore val] == 1} {
if {$option in $user_options} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::$option $val
</span> global macports::$option
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ set $option $val
</span> }
}
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1044,7 +1092,7 @@ proc mportinit {{up_ui_options {}} {up_options {}} {up_variations {}}} {
</span> return -code error "sources_conf must be set in ${macports_conf_path}/macports.conf or in your ${macports_user_dir}/macports.conf file"
}
# Precompute mapping of source URLs to prefix to use for porturls (used in mportlookup etc)
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set ::macports::porturl_prefix_map [dict create]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set porturl_prefix_map [dict create]
</span> set sources_conf_comment_re {^\s*#|^$}
set sources_conf_source_re {^([\w-]+://\S+)(?:\s+\[(\w+(?:,\w+)*)\])?$}
set fd [open $sources_conf r]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1074,10 +1122,10 @@ Please edit sources.conf and change '$url' to '[string range $url 0 end-6]tarbal
</span> http -
ftp {
# Rsync and snapshot tarballs create Portfiles in the local filesystem
<span style='display:block; white-space:pre;background:#ffe0e0;'>- dict set ::macports::porturl_prefix_map $url file://[macports::getsourcepath $url]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dict set porturl_prefix_map $url file://[macports::getsourcepath $url]
</span> }
default {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- dict set ::macports::porturl_prefix_map $url $url
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dict set porturl_prefix_map $url $url
</span> }
}
lappend sources [concat [list $url] $flags]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1128,17 +1176,16 @@ Please edit sources.conf and change '$url' to '[string range $url 0 end-6]tarbal
</span> ui_debug "$variants_conf does not exist, variants_conf setting ignored."
}
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::global_variations
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- array set macports::global_variations [array get variations]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ array set global_variations [array get variations]
</span>
# pubkeys.conf
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::archivefetch_pubkeys [list]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set archivefetch_pubkeys [list]
</span> if {[file isfile [file join $macports_conf_path pubkeys.conf]]} {
set fd [open [file join $macports_conf_path pubkeys.conf] r]
while {[gets $fd line] >= 0} {
set line [string trim $line]
if {![regexp $variants_conf_comment_re $line]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- lappend macports::archivefetch_pubkeys $line
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lappend archivefetch_pubkeys $line
</span> }
}
close $fd
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1146,6 +1193,9 @@ Please edit sources.conf and change '$url' to '[string range $url 0 end-6]tarbal
</span> ui_debug "pubkeys.conf does not exist."
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![info exists prefix]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return -code error "prefix must be set in ${macports_conf_path}/macports.conf or in your ${macports_user_dir}/macports.conf"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> if {![info exists portdbpath]} {
return -code error "portdbpath must be set in ${macports_conf_path}/macports.conf or in your ${macports_user_dir}/macports.conf"
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1172,116 +1222,108 @@ Please edit sources.conf and change '$url' to '[string range $url 0 end-6]tarbal
</span>
# Autoclean mode, whether to automatically call clean after "install"
if {![info exists portautoclean]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::portautoclean yes
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::portautoclean
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set portautoclean yes
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::portautoclean_frozen $portautoclean
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set portautoclean_frozen $portautoclean
</span> # whether to keep logs after successful builds
if {![info exists keeplogs]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::keeplogs no
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::keeplogs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set keeplogs no
</span> }
# Check command line override for autoclean
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists macports::global_options(ports_autoclean)]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$macports::global_options(ports_autoclean) ne $portautoclean} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::portautoclean $macports::global_options(ports_autoclean)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[info exists global_options(ports_autoclean)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$global_options(ports_autoclean) ne $portautoclean} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set portautoclean $global_options(ports_autoclean)
</span> }
}
# Trace mode, whether to use darwintrace to debug ports.
if {![info exists porttrace]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::porttrace no
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::porttrace
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set porttrace no
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::porttrace_frozen $porttrace
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set porttrace_frozen $porttrace
</span> # Check command line override for trace
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists macports::global_options(ports_trace)]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$macports::global_options(ports_trace) ne $porttrace} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::porttrace $macports::global_options(ports_trace)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[info exists global_options(ports_trace)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$global_options(ports_trace) ne $porttrace} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set porttrace $global_options(ports_trace)
</span> }
}
# Check command line override for source/binary only mode
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists macports::global_options(ports_binary_only)]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- && ![info exists macports::global_options(ports_source_only)]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- && [info exists macports::buildfromsource]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$macports::buildfromsource eq "never"} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::global_options(ports_binary_only) yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![info exists global_options(ports_binary_only)]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ && ![info exists global_options(ports_source_only)]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ && [info exists buildfromsource]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$buildfromsource eq "never"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set global_options(ports_binary_only) yes
</span> set temp_options(ports_binary_only) yes
<span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {$macports::buildfromsource eq "always"} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::global_options(ports_source_only) yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } elseif {$buildfromsource eq "always"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set global_options(ports_source_only) yes
</span> set temp_options(ports_source_only) yes
<span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {$macports::buildfromsource ne "ifneeded"} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_warn "'buildfromsource' set to unknown value '$macports::buildfromsource', using 'ifneeded' instead"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } elseif {$buildfromsource ne "ifneeded"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_warn "'buildfromsource' set to unknown value '$buildfromsource', using 'ifneeded' instead"
</span> }
}
# Duplicate prefix into prefix_frozen, so that port actions
# can always get to the original prefix, even if a portfile overrides prefix
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::prefix_frozen $prefix
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set prefix_frozen $prefix
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists macports::applications_dir]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::applications_dir /Applications/MacPorts
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![info exists applications_dir]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set applications_dir /Applications/MacPorts
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::applications_dir_frozen ${macports::applications_dir}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set applications_dir_frozen ${applications_dir}
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists macports::frameworks_dir]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::frameworks_dir_frozen ${macports::frameworks_dir}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[info exists frameworks_dir]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set frameworks_dir_frozen ${frameworks_dir}
</span> } else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::frameworks_dir_frozen ${macports::prefix_frozen}/Library/Frameworks
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set frameworks_dir_frozen ${prefix_frozen}/Library/Frameworks
</span> }
# Export verbosity.
if {![info exists portverbose]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::portverbose no
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::portverbose
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set portverbose no
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::portverbose_frozen $portverbose
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists macports::ui_options(ports_verbose)]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$macports::ui_options(ports_verbose) ne $portverbose} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::portverbose $macports::ui_options(ports_verbose)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set portverbose_frozen $portverbose
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[info exists ui_options(ports_verbose)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$ui_options(ports_verbose) ne $portverbose} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set portverbose $ui_options(ports_verbose)
</span> }
}
# Set noninteractive mode if specified in config
if {[info exists ui_interactive] && !$ui_interactive} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::ui_options(ports_noninteractive) yes
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- unset -nocomplain macports::ui_options(questions_yesno) \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- macports::ui_options(questions_singlechoice) \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- macports::ui_options(questions_multichoice) \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- macports::ui_options(questions_alternative)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set ui_options(ports_noninteractive) yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ unset -nocomplain ui_options(questions_yesno) \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_options(questions_singlechoice) \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_options(questions_multichoice) \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_options(questions_alternative)
</span>
}
# Archive type, what type of binary archive to use (CPIO, gzipped
# CPIO, XAR, etc.)
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::portarchivetype
</span> if {![info exists portarchivetype]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::portarchivetype tbz2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set portarchivetype tbz2
</span> } else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::portarchivetype [lindex $portarchivetype 0]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set portarchivetype [lindex $portarchivetype 0]
</span> }
# Enable HFS+ compression by default
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists macports::hfscompression]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::hfscompression yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![info exists hfscompression]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set hfscompression yes
</span> }
# Set rync options
if {![info exists rsync_server]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::rsync_server
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::rsync_server rsync.macports.org
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set rsync_server rsync.macports.org
</span> }
if {![info exists rsync_dir]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::rsync_dir
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::rsync_dir macports/release/tarballs/base.tar
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {[string range $rsync_dir end-3 end] ne ".tar" && [string match *.macports.org ${macports::rsync_server}]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set rsync_dir macports/release/tarballs/base.tar
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } elseif {[string range $rsync_dir end-3 end] ne ".tar" && [string match *.macports.org ${rsync_server}]} {
</span> ui_warn "MacPorts is configured to use an unsigned source for selfupdate.\
Please edit macports.conf and change the rsync_dir setting to\
match macports.conf.default."
}
if {![info exists rsync_options]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::rsync_options
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set rsync_options "-rtzvl --delete-after"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set rsync_options {-rtzvl --delete-after}
</span> }
set portsharepath ${prefix}/share/macports
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1296,67 +1338,67 @@ match macports.conf.default."
</span> }
# Set startupitem default type (can be overridden by portfile)
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists macports::startupitem_type]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::startupitem_type default
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![info exists startupitem_type]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set startupitem_type default
</span> }
# Set whether startupitems are symlinked into system directories
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists macports::startupitem_install]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::startupitem_install yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![info exists startupitem_install]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set startupitem_install yes
</span> }
# Set whether ports are allowed to auto-load their startupitems
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists macports::startupitem_autostart]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::startupitem_autostart yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![info exists startupitem_autostart]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set startupitem_autostart yes
</span> }
# Default place_worksymlink
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists macports::place_worksymlink]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::place_worksymlink yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![info exists place_worksymlink]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set place_worksymlink yes
</span> }
# Default mp configure options
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists macports::configureccache]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::configureccache no
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![info exists configureccache]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set configureccache no
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists macports::ccache_dir]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::ccache_dir [file join $portdbpath build .ccache]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![info exists ccache_dir]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set ccache_dir [file join $portdbpath build .ccache]
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists macports::ccache_size]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::ccache_size 2G
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![info exists ccache_size]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set ccache_size 2G
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists macports::configuredistcc]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::configuredistcc no
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![info exists configuredistcc]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set configuredistcc no
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists macports::configurepipe]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::configurepipe yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![info exists configurepipe]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set configurepipe yes
</span> }
# Default mp build options
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists macports::buildnicevalue]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::buildnicevalue 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![info exists buildnicevalue]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set buildnicevalue 0
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists macports::buildmakejobs]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::buildmakejobs 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![info exists buildmakejobs]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set buildmakejobs 0
</span> }
# default user to run as when privileges can be dropped
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists macports::macportsuser]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::macportsuser $macports::autoconf::macportsuser
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![info exists macportsuser]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set macportsuser $macports::autoconf::macportsuser
</span> }
# Default mp universal options
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists macports::universal_archs]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![info exists universal_archs]} {
</span> if {$os_major >= 20} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::universal_archs {arm64 x86_64}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set universal_archs [list arm64 x86_64]
</span> } elseif {$os_major >= 19} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::universal_archs {x86_64}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set universal_archs [list x86_64]
</span> } elseif {$os_major >= 10} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::universal_archs {x86_64 i386}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set universal_archs [list x86_64 i386]
</span> } else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::universal_archs {i386 ppc}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set universal_archs [list i386 ppc]
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {[llength $macports::universal_archs] == 1} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } elseif {[llength $universal_archs] == 1} {
</span> # allow empty value to disable universal
if {$os_major < 18 || $os_major > 19} {
ui_warn "invalid universal_archs configured (should contain at least 2 archs)"
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1364,101 +1406,101 @@ match macports.conf.default."
</span> }
# Default arch to build for
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists macports::build_arch]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![info exists build_arch]} {
</span> if {$os_platform eq "darwin"} {
if {$os_major >= 20} {
if {$os_arch eq "arm"} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::build_arch arm64
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set build_arch arm64
</span> } else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::build_arch x86_64
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set build_arch x86_64
</span> }
} elseif {$os_major >= 10} {
if {[sysctl hw.cpu64bit_capable] == 1} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::build_arch x86_64
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set build_arch x86_64
</span> } else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::build_arch i386
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set build_arch i386
</span> }
} else {
if {$os_arch eq "powerpc"} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::build_arch ppc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set build_arch ppc
</span> } else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::build_arch i386
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set build_arch i386
</span> }
}
} else {
switch -glob $tcl_platform(machine) {
"Power Macintosh" -
ppc* {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::build_arch ppc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set build_arch ppc
</span> }
i[3-7]86 {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::build_arch i386
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set build_arch i386
</span> }
x86_64 {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::build_arch x86_64
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set build_arch x86_64
</span> }
arm* -
aarch* {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::build_arch arm64
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set build_arch arm64
</span> }
default {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::build_arch {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set build_arch {}
</span> }
}
}
} else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::build_arch [lindex $macports::build_arch 0]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set build_arch [lindex $build_arch 0]
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists macports::macosx_deployment_target]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![info exists macosx_deployment_target]} {
</span> if {[vercmp $macos_version 11] >= 0} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::macosx_deployment_target ${macos_version_major}.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set macosx_deployment_target ${macos_version_major}.0
</span> } else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::macosx_deployment_target $macos_version_major
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set macosx_deployment_target $macos_version_major
</span> }
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists macports::macosx_sdk_version]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::macosx_sdk_version $macos_version_major
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![info exists macosx_sdk_version]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set macosx_sdk_version $macos_version_major
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists macports::revupgrade_autorun]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![info exists revupgrade_autorun]} {
</span> if {$os_platform eq "darwin"} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::revupgrade_autorun yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set revupgrade_autorun yes
</span> } else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::revupgrade_autorun no
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set revupgrade_autorun no
</span> }
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists macports::revupgrade_mode]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::revupgrade_mode rebuild
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![info exists revupgrade_mode]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set revupgrade_mode rebuild
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists macports::delete_la_files]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![info exists delete_la_files]} {
</span> if {$os_platform eq "darwin" && $os_major >= 13} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::delete_la_files yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set delete_la_files yes
</span> } else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::delete_la_files no
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set delete_la_files no
</span> }
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists macports::cxx_stdlib]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![info exists cxx_stdlib]} {
</span> if {$os_platform eq "darwin" && $os_major >= 10} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::cxx_stdlib libc++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set cxx_stdlib libc++
</span> } elseif {$os_platform eq "darwin"} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::cxx_stdlib libstdc++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set cxx_stdlib libstdc++
</span> } else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::cxx_stdlib {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set cxx_stdlib {}
</span> }
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists macports::global_options(ports_rev-upgrade_id-loadcmd-check)]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- && [info exists macports::revupgrade_check_id_loadcmds]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::global_options(ports_rev-upgrade_id-loadcmd-check) $macports::revupgrade_check_id_loadcmds
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set temp_options(ports_rev-upgrade_id-loadcmd-check) $macports::revupgrade_check_id_loadcmds
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![info exists global_options(ports_rev-upgrade_id-loadcmd-check)]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ && [info exists revupgrade_check_id_loadcmds]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set global_options(ports_rev-upgrade_id-loadcmd-check) $revupgrade_check_id_loadcmds
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set temp_options(ports_rev-upgrade_id-loadcmd-check) $revupgrade_check_id_loadcmds
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists macports::sandbox_enable]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::sandbox_enable yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![info exists sandbox_enable]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set sandbox_enable yes
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists macports::sandbox_network]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::sandbox_network no
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![info exists sandbox_network]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set sandbox_network no
</span> }
# make tools we run operate in UTF-8 mode
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1499,8 +1541,7 @@ match macports.conf.default."
</span> }
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set env_names [array names env]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach envkey $env_names {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach envkey [array names env] {
</span> if {$envkey ni $keepenvkeys} {
unset env($envkey)
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1508,29 +1549,29 @@ match macports.conf.default."
</span>
if {![info exists xcodeversion] || ![info exists xcodebuildcmd]} {
# We'll resolve these later (if needed)
<span style='display:block; white-space:pre;background:#ffe0e0;'>- trace add variable macports::xcodeversion read macports::setxcodeinfo
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- trace add variable macports::xcodebuildcmd read macports::setxcodeinfo
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ trace add variable xcodeversion read macports::setxcodeinfo
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ trace add variable xcodebuildcmd read macports::setxcodeinfo
</span> }
if {![info exists xcodecltversion]} {
if {$os_platform eq "darwin"} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- trace add variable macports::xcodecltversion read macports::set_xcodecltversion
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ trace add variable xcodecltversion read macports::set_xcodecltversion
</span> } else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::xcodecltversion {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set xcodecltversion {}
</span> }
}
if {![info exists xcode_license_unaccepted]} {
if {$os_platform eq "darwin"} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- trace add variable macports::xcode_license_unaccepted read macports::set_xcode_license_unaccepted
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ trace add variable xcode_license_unaccepted read macports::set_xcode_license_unaccepted
</span> } else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::xcode_license_unaccepted no
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set xcode_license_unaccepted no
</span> }
}
if {![info exists developer_dir]} {
if {$os_platform eq "darwin"} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- trace add variable macports::developer_dir read macports::set_developer_dir
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ trace add variable developer_dir read macports::set_developer_dir
</span> } else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::developer_dir {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set developer_dir {}
</span> }
} else {
if {$os_platform eq "darwin" && ![file isdirectory $developer_dir]} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1601,25 +1642,25 @@ match macports.conf.default."
</span> }
# add ccache to environment
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set env(CCACHE_DIR) $macports::ccache_dir
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set env(CCACHE_DIR) $ccache_dir
</span>
# load caches on demand
trace add variable macports::compiler_version_cache read macports::load_compiler_version_cache
trace add variable macports::ping_cache {read write} macports::load_ping_cache
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists macports::host_blacklist]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::host_blacklist {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![info exists host_blacklist]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set host_blacklist {}
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists macports::preferred_hosts]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::preferred_hosts {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![info exists preferred_hosts]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set preferred_hosts {}
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::host_cache [dict create]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set host_cache [dict create]
</span>
# load the quick index unless told not to
if {![macports::global_option_isset ports_no_load_quick_index]} {
trace add variable macports::quick_index {read write} macports::load_quickindex
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists macports::ui_options(ports_no_old_index_warning)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![info exists ui_options(ports_no_old_index_warning)]} {
</span> set default_source_url [lindex $sources_default 0]
if {[macports::getprotocol $default_source_url] eq "file" || [macports::getprotocol $default_source_url] eq "rsync"} {
set default_portindex [macports::getindex $default_source_url]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1673,7 +1714,7 @@ proc mportshutdown {} {
</span>
# link plist for xcode 4.3's benefit
proc macports::copy_xcode_plist {target_homedir} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::user_home macports::macportsuser
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable user_home; variable macportsuser
</span> set user_plist "${user_home}/Library/Preferences/com.apple.dt.Xcode.plist"
set target_dir "${target_homedir}/Library/Preferences"
file delete -force "${target_dir}/com.apple.dt.Xcode.plist"
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1700,7 +1741,8 @@ proc macports::copy_xcode_plist {target_homedir} {
</span> }
proc macports::worker_init {workername portpath porturl portbuildpath options variations} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::portinterp_options macports::portinterp_deferred_options
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable portinterp_options; variable portinterp_deferred_options
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable ui_priorities; variable ui_options
</span>
# Hide any Tcl commands that should be inaccessible to port1.0 and Portfiles
# exit: It should not be possible to exit the interpreter
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1735,21 +1777,21 @@ proc macports::worker_init {workername portpath porturl portbuildpath options va
</span> $workername alias set_phase set_phase
# instantiate the UI call-backs
<span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach priority $macports::ui_priorities {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach priority $ui_priorities {
</span> $workername alias ui_$priority ui_$priority
}
# add the UI progress call-backs (or a no-op alias, if unavailable)
foreach pname {progress_download progress_generic} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists macports::ui_options($pname)]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- $workername alias ui_$pname $macports::ui_options($pname)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[info exists ui_options($pname)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ $workername alias ui_$pname $ui_options($pname)
</span> } else {
$workername alias ui_$pname return -level 0
}
}
# notifications callback
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists macports::ui_options(notifications_append)]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- $workername alias ui_notifications_append $macports::ui_options(notifications_append)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[info exists ui_options(notifications_append)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ $workername alias ui_notifications_append $ui_options(notifications_append)
</span> } else {
# provide a no-op if notifications_append wasn't set. See http://wiki.tcl.tk/3044
$workername alias ui_notifications_append return -level 0
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1817,7 +1859,7 @@ proc macports::worker_init {workername portpath porturl portbuildpath options va
</span>
foreach opt $portinterp_options {
if {![info exists $opt]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::$opt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable $opt
</span> }
if {[info exists $opt]} {
$workername eval [list set system_options($opt) [set $opt]]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1826,16 +1868,16 @@ proc macports::worker_init {workername portpath porturl portbuildpath options va
</span> }
foreach opt $portinterp_deferred_options {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::$opt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable $opt
</span> # define the trace hook.
$workername eval [list \
proc trace_$opt {name1 name2 op} "
<span style='display:block; white-space:pre;background:#ffe0e0;'>- trace remove variable ::$opt read ::trace_$opt
</span> global $opt
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ trace remove variable $opt read trace_$opt
</span> set $opt \[getoption $opt\]
"]
# next access will actually define the variable.
<span style='display:block; white-space:pre;background:#ffe0e0;'>- $workername eval [list trace add variable ::$opt read ::trace_$opt]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ $workername eval [list trace add variable $opt read trace_$opt]
</span> # define some value now
$workername eval [list set $opt ?]
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1857,7 +1899,7 @@ proc macports::worker_init {workername portpath porturl portbuildpath options va
</span> proc macports::create_thread {} {
package require Thread
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::portinterp_options
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable portinterp_options
</span>
# Create the thread.
set result [thread::create -preserved [list thread::wait]]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1875,12 +1917,10 @@ proc macports::create_thread {} {
</span> thread::send -async $result [list namespace eval macports {}]
foreach opt $portinterp_options {
if {![info exists $opt]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::$opt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable $opt
</span> }
if {[info exists $opt]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- thread::send -async $result [list global macports::$opt]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set val [set macports::$opt]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- thread::send -async $result [list set macports::$opt $val]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ thread::send -async $result [list set macports::$opt [set $opt]]
</span> }
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1921,7 +1961,7 @@ proc macports::get_tar_flags {suffix} {
</span> # @param local one, if the URL is local, zero otherwise
# @return a path to a directory containing the Portfile, or an error code
proc macports::fetch_port {url {local 0}} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::portdbpath macports::ui_prefix macports::portverbose macports::ui_options
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable portdbpath
</span>
set fetchdir [file join $portdbpath portdirs]
file mkdir $fetchdir
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1932,13 +1972,15 @@ proc macports::fetch_port {url {local 0}} {
</span> if {$local} {
set filepath $url
} else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg "$macports::ui_prefix Fetching port $url"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable ui_prefix; variable ui_options
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable portverbose
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "$ui_prefix Fetching port $url"
</span> set fetchfile [file tail $url]
set progressflag {}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$macports::portverbose} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set progressflag "--progress builtin"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {[info exists macports::ui_options(progress_download)]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set progressflag "--progress ${macports::ui_options(progress_download)}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$portverbose} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set progressflag [list --progress builtin]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } elseif {[info exists ui_options(progress_download)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set progressflag [list --progress $ui_options(progress_download)]
</span> }
set filepath [file join $fetchdir $fetchfile]
if {[catch {curl fetch {*}$progressflag $url $filepath} result]} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2006,9 +2048,9 @@ proc macports::fetch_port {url {local 0}} {
</span> return [file join $fetchdir $portname]
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-set macports::getprotocol_re {(?x)([^:]+)://.+}
</span> proc macports::getprotocol {url} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[regexp $::macports::getprotocol_re $url match protocol] == 1} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable getprotocol_re
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[regexp $getprotocol_re $url match protocol] == 1} {
</span> return $protocol
} else {
return -code error "Can't parse url $url"
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2025,7 +2067,7 @@ proc macports::getprotocol {url} {
</span> # unsupported protocol, or if the tarball pointed to by \a url didn't
# contain a Portfile.
proc macports::getportdir {url} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::extracted_portdirs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable extracted_portdirs
</span>
set protocol [macports::getprotocol $url]
switch -- $protocol {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2037,10 +2079,10 @@ proc macports::getportdir {url} {
</span> } else {
# the URL points to a local tarball that (hopefully) contains a Portfile
# create a local dir for the extracted port, but only once
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists macports::extracted_portdirs($url)]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::extracted_portdirs($url) [macports::fetch_port $path 1]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![info exists extracted_portdirs($url)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set extracted_portdirs($url) [macports::fetch_port $path 1]
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>- return $macports::extracted_portdirs($url)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return $extracted_portdirs($url)
</span> }
}
https -
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2048,10 +2090,10 @@ proc macports::getportdir {url} {
</span> ftp {
# the URL points to a remote tarball that (hopefully) contains a Portfile
# create a local dir for the extracted port, but only once
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists macports::extracted_portdirs($url)]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::extracted_portdirs($url) [macports::fetch_port $url 0]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![info exists extracted_portdirs($url)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set extracted_portdirs($url) [macports::fetch_port $url 0]
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>- return $macports::extracted_portdirs($url)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return $extracted_portdirs($url)
</span> }
default {
return -code error "Unsupported protocol $protocol"
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2097,7 +2139,7 @@ proc macports::getportresourcepath {url {path {}} {fallback yes}} {
</span> # @param path path in _resources we are interested in
# @return path to the _resources directory of the default source
proc macports::getdefaultportresourcepath {{path {}}} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::sources_default
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable sources_default
</span>
set default_source_url [lindex $sources_default 0]
if {[getprotocol $default_source_url] eq "file"} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2113,8 +2155,6 @@ proc macports::getdefaultportresourcepath {{path {}}} {
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>-set macports::file_porturl_re {^file://(.*)}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> ##
# Opens a MacPorts portfile specified by a URL. The URL can be local (starting
# with file://), or remote (http, https, or ftp). In the local case, the URL
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2137,10 +2177,10 @@ set macports::file_porturl_re {^file://(.*)}
</span> # @param nocache a non-empty string, if port information caching should be
# avoided.
proc mportopen {porturl {options {}} {variations {}} {nocache {}}} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::portdbpath macports::portconf macports::open_mports auto_path
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global macports::open_mports macports::file_porturl_re
</span>
# normalize porturl for local files
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[regexp $::macports::file_porturl_re $porturl -> path]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[regexp $file_porturl_re $porturl -> path]} {
</span> set realporturl "file://[file normalize $path]"
if {$porturl ne $realporturl} {
set porturl $realporturl
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2154,7 +2194,7 @@ proc mportopen {porturl {options {}} {variations {}} {nocache {}}} {
</span> set mport ""
} else {
set comparators [dict create variations dictequal options dictequal]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set mport [dlist_match_multi $macports::open_mports [list porturl $porturl variations $variations options $options] $comparators]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set mport [dlist_match_multi $open_mports [list porturl $porturl variations $variations options $options] $comparators]
</span> }
if {$mport ne ""} {
# just in case more than one somehow matches
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2176,7 +2216,7 @@ proc mportopen {porturl {options {}} {variations {}} {nocache {}}} {
</span> set workername [interp create]
set mport [ditem_create]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- lappend macports::open_mports $mport
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lappend open_mports $mport
</span> ditem_key $mport porturl $porturl
ditem_key $mport portpath $portpath
ditem_key $mport workername $workername
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2462,8 +2502,9 @@ proc _mportcheck_known_fail {options portinfo} {
</span> if {![macports::ui_isset ports_debug]} {
ui_msg {}
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists macports::ui_options(questions_yesno)]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- 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><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global macports::ui_options
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[info exists ui_options(questions_yesno)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set retvalue [$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} {
ui_error "[dict get $portinfo name] is known to fail"
return 1
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2493,7 +2534,8 @@ proc _mportexec {target mport} {
</span> ![catch {$workername eval [list check_supported_archs]} result] && $result == 0 &&
![catch {$workername eval [list eval_targets $target]} result] && $result == 0} {
# If auto-clean mode, clean-up after dependency install
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$macports::portautoclean} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global macports::portautoclean
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$portautoclean} {
</span> # Make sure we are back in the port path before clean.
# Otherwise, if the current directory had been changed to
# inside the port, the next port may fail when trying to
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2506,8 +2548,9 @@ proc _mportexec {target mport} {
</span> macports::pop_log
return 0
} else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists ::logenabled] && $::logenabled && [info exists ::debuglogname]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_error "See $::debuglogname for details."
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global macports::logenabled macports::debuglogname
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[info exists logenabled] && $logenabled && [info exists debuglogname]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_error "See $debuglogname for details."
</span> }
macports::pop_log
return 1
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2517,6 +2560,7 @@ proc _mportexec {target mport} {
</span> # mportexec
# Execute the specified target of the given mport.
proc mportexec {mport target} {
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ global macports::ui_prefix macports::portautoclean
</span> set workername [ditem_key $mport workername]
# check for existence of macportsuser and use fallback if necessary
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2565,7 +2609,7 @@ proc mportexec {mport target} {
</span> }
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg -nonewline "$macports::ui_prefix Computing dependencies for [_mportkey $mport subport]"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg -nonewline "$ui_prefix Computing dependencies for [_mportkey $mport subport]"
</span> if {[macports::ui_isset ports_debug]} {
# play nice with debug messages
ui_msg {}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2585,12 +2629,13 @@ proc mportexec {mport target} {
</span> ##
# User Interaction Question
# Asking before installing dependencies
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists macports::ui_options(questions_yesno)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global macports::ui_options
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[info exists ui_options(questions_yesno)]} {
</span> set deplist [list]
foreach ditem $dlist {
lappend deplist [ditem_key $ditem provides]
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set retvalue [$macports::ui_options(questions_yesno) "The following dependencies will be installed: " "TestCase#2" [lsort $deplist] {y} 0]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set retvalue [$ui_options(questions_yesno) "The following dependencies will be installed: " "TestCase#2" [lsort $deplist] {y} 0]
</span> if {$retvalue == 1} {
if {$log_needs_pop} {
macports::pop_log
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2601,7 +2646,7 @@ proc mportexec {mport target} {
</span> return 0
}
} else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set depstring "$macports::ui_prefix Dependencies to be installed:"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set depstring "$ui_prefix Dependencies to be installed:"
</span> foreach ditem $dlist {
append depstring " [ditem_key $ditem provides]"
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2659,25 +2704,22 @@ proc mportexec {mport target} {
</span> }
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set clean 0
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$macports::portautoclean && ($target eq "install" || $target eq "activate")} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # If we're doing an install, check if we should clean after
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set clean 1
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> # Build this port with the specified target
set result [$workername eval [list eval_targets $target]]
# If auto-clean mode and successful install, clean-up after install
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$result == 0 && $clean == 1} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$result == 0 && $portautoclean && $target in {install activate}} {
</span> # Make sure we are back in the port path, just in case
set portpath [ditem_key $mport portpath]
catch {cd $portpath}
$workername eval [list eval_targets clean]
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$result != 0 && [info exists ::logenabled] && $::logenabled && [info exists ::debuglogname]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_error "See $::debuglogname for details."
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$result != 0} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global macports::logenabled macports::debuglogname
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[info exists logenabled] && $logenabled && [info exists debuglogname]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_error "See $debuglogname for details."
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> }
if {$log_needs_pop} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2689,6 +2731,7 @@ proc mportexec {mport target} {
</span>
# upgrade any dependencies of mport that are installed and needed for target
proc macports::_upgrade_mport_deps {mport target} {
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable universal_archs
</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:#e0e0e0;'>@@ -2735,14 +2778,14 @@ proc macports::_upgrade_mport_deps {mport target} {
</span> # not installed universal
set missing [list]
foreach arch $required_archs {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$arch ni $macports::universal_archs} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$arch ni $universal_archs} {
</span> lappend missing $arch
}
}
if {[llength $missing] > 0} {
ui_error "Cannot install [_mportkey $mport subport] for the arch${s} '$required_archs' because"
ui_error "its dependency $dep_portname is only installed for the arch '$active_archs'"
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_error "and the configured universal_archs '$macports::universal_archs' are not sufficient."
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_error "and the configured universal_archs '$universal_archs' are not sufficient."
</span> return -code error "architecture mismatch"
} else {
# upgrade the dep with +universal
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2776,7 +2819,7 @@ proc macports::_upgrade_mport_deps {mport target} {
</span> }
proc macports::getsourcepath {url} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::portdbpath
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable portdbpath
</span>
set source_path [split $url ://]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2788,7 +2831,6 @@ proc macports::getsourcepath {url} {
</span> return [file join $portdbpath sources [lindex $source_path 3] [lindex $source_path 4] [lindex $source_path 5]]
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-set macports::source_is_snapshot_re {^((?:https?|ftp|rsync)://.+/)(.+\.(tar\.gz|tar\.bz2|tar))$}
</span> ##
# Checks whether a supplied source URL is for a snapshot tarball
# (private)
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2798,11 +2840,12 @@ set macports::source_is_snapshot_re {^((?:https?|ftp|rsync)://.+/)(.+\.(tar\.gz|
</span> # @param extension upvar variable name for extension
# @param extension upvar variable name for URL excluding the filename
proc _source_is_snapshot {url {filename {}} {extension {}} {rooturl {}}} {
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ global macports::source_is_snapshot_re
</span> upvar $rooturl myrooturl
upvar $filename myfilename
upvar $extension myextension
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[regexp $::macports::source_is_snapshot_re $url -> u f e]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[regexp $source_is_snapshot_re $url -> u f e]} {
</span> set myrooturl $u
set myfilename $f
set myextension $e
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2833,14 +2876,14 @@ proc _source_is_obsolete_svn_repo {source_dir} {
</span> }
proc macports::getportbuildpath {id {portname {}}} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::portdbpath
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable portdbpath
</span> regsub {://} $id {.} port_path
regsub -all {/} $port_path {_} port_path
return [file join $portdbpath build $port_path $portname]
}
proc macports::getportlogpath {id {portname {}}} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::portdbpath
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable portdbpath
</span> regsub {://} $id {.} port_path
regsub -all {/} $port_path {_} port_path
return [file join $portdbpath logs $port_path $portname]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2874,7 +2917,8 @@ proc macports::getindex {source} {
</span> # VCSCleanup after running the VCS commands.
proc macports::VCSPrepare {dir statevar} {
if {[getuid] == 0} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global env macports::user_ssh_auth_sock
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global env
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable user_ssh_auth_sock
</span> upvar $statevar state
# Must change egid before dropping root euid.
set state(oldEGID) [getegid]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2886,8 +2930,8 @@ proc macports::VCSPrepare {dir statevar} {
</span> set state(oldEnv) [array get env]
set env(HOME) [getpwuid $newEUID dir]
set envdebug "HOME=$env(HOME)"
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists macports::user_ssh_auth_sock]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set env(SSH_AUTH_SOCK) $macports::user_ssh_auth_sock
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[info exists user_ssh_auth_sock]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set env(SSH_AUTH_SOCK) $user_ssh_auth_sock
</span> append envdebug " SSH_AUTH_SOCK=$env(SSH_AUTH_SOCK)"
}
ui_debug "euid/egid changed to: $newEUID/$newEGID, env: $envdebug"
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2902,6 +2946,7 @@ proc macports::VCSPrepare {dir statevar} {
</span> # @param state Variable name that was passed to VCSPrepare previously.
proc macports::VCSCleanup {statevar} {
if {[getuid] == 0} {
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ global env
</span> upvar $statevar state
seteuid $state(oldEUID)
setegid $state(oldEGID)
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2985,10 +3030,9 @@ proc macports::UpdateVCS {cmd dir} {
</span> }
proc mportsync {{options {}}} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::sources macports::rsync_options \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- macports::portverbose macports::autoconf::rsync_path \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- macports::autoconf::tar_path macports::autoconf::openssl_path \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- macports::ui_options
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global macports::sources macports::ui_prefix \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports::os_platform macports::os_major \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports::os_arch macports::autoconf::tar_path
</span>
if {[dict exists $options no_reindex]} {
upvar [dict get $options needed_portindex_var] any_needed_portindex
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2997,7 +3041,7 @@ proc mportsync {{options {}}} {
</span> set numfailed 0
set obsoletesvn 0
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg "$macports::ui_prefix Updating the ports tree"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "$ui_prefix Updating the ports tree"
</span> foreach source $sources {
set flags [lrange $source 1 end]
set source [lindex $source 0]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3039,6 +3083,7 @@ proc mportsync {{options {}}} {
</span> set needs_portindex true
}
{^rsync$} {
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ global macports::rsync_options macports::autoconf::rsync_path
</span> # Where to, boss?
set indexfile [macports::getindex $source]
set destdir [file dirname $indexfile]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3062,7 +3107,7 @@ proc mportsync {{options {}}} {
</span> set srcstr $source
}
# Do rsync fetch
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set rsync_commandline "$macports::autoconf::rsync_path $rsync_options $include_option $exclude_option $srcstr $destdir"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set rsync_commandline "$rsync_path $rsync_options $include_option $exclude_option $srcstr $destdir"
</span> macports_try -pass_signal {
system $rsync_commandline
} on error {} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3073,12 +3118,12 @@ proc mportsync {{options {}}} {
</span>
if {$is_tarball} {
# verify signature for tarball
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::archivefetch_pubkeys macports::hfscompression
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global macports::archivefetch_pubkeys macports::hfscompression macports::autoconf::openssl_path
</span> set tarball ${destdir}/[file tail $source]
set signature ${tarball}.rmd160
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set openssl [macports::findBinary openssl $macports::autoconf::openssl_path]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set openssl [macports::findBinary openssl $openssl_path]
</span> set verified 0
<span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach pubkey $macports::archivefetch_pubkeys {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach pubkey $archivefetch_pubkeys {
</span> macports_try -pass_signal {
exec $openssl dgst -ripemd160 -verify $pubkey -signature $signature $tarball
set verified 1
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3095,13 +3140,13 @@ proc mportsync {{options {}}} {
</span> continue
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {${macports::hfscompression} && [getuid] == 0 &&
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${hfscompression} && [getuid] == 0 &&
</span> ![catch {macports::binaryInPath bsdtar}] &&
![catch {exec bsdtar -x --hfsCompression < /dev/null >& /dev/null}]} {
ui_debug "Using bsdtar with HFS+ compression (if valid)"
set tar "bsdtar --hfsCompression"
} else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set tar [macports::findBinary tar $macports::autoconf::tar_path]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set tar [macports::findBinary tar $tar_path]
</span> }
# extract tarball and move into place
file mkdir ${destdir}/tmp
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3138,8 +3183,8 @@ proc mportsync {{options {}}} {
</span> } else {
set index_source $source
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set remote_indexdir "${index_source}PortIndex_${macports::os_platform}_${macports::os_major}_${macports::os_arch}/"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set rsync_commandline "$macports::autoconf::rsync_path $rsync_options $include_option $remote_indexdir $destdir"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set remote_indexdir "${index_source}PortIndex_${os_platform}_${os_major}_${os_arch}/"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set rsync_commandline "$rsync_path $rsync_options $include_option $remote_indexdir $destdir"
</span> macports_try -pass_signal {
system $rsync_commandline
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3149,7 +3194,7 @@ proc mportsync {{options {}}} {
</span> set ok 0
set needs_portindex true
# verify signature for PortIndex
<span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach pubkey $macports::archivefetch_pubkeys {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach pubkey $archivefetch_pubkeys {
</span> macports_try -pass_signal {
exec $openssl dgst -ripemd160 -verify $pubkey -signature ${destdir}/PortIndex.rmd160 ${destdir}/PortIndex
set ok 1
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3208,12 +3253,13 @@ proc mportsync {{options {}}} {
</span>
file mkdir $destdir
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ global macports::portverbose macports::ui_options
</span> set progressflag {}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$macports::portverbose} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set progressflag "--progress builtin"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$portverbose} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set progressflag [list --progress builtin]
</span> set verboseflag "-v"
<span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {[info exists macports::ui_options(progress_download)]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set progressflag "--progress ${macports::ui_options(progress_download)}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } elseif {[info exists ui_options(progress_download)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set progressflag [list --progress $ui_options(progress_download)]
</span> set verboseflag ""
}
macports_try -pass_signal {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3239,7 +3285,7 @@ proc mportsync {{options {}}} {
</span> # as top-level directory name.
set striparg "--strip-components=1"
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set tar [macports::findBinary tar $macports::autoconf::tar_path]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set tar [macports::findBinary tar $tar_path]
</span> if {[catch {system -W ${destdir} "$tar $verboseflag $striparg $extflag -xf [macports::shellescape $tarpath]"} error]} {
ui_error "Extracting $source failed ($error)"
incr numfailed
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3250,7 +3296,7 @@ proc mportsync {{options {}}} {
</span> ui_warn "Setting world read permissions on parts of the ports tree failed, need root?"
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set platindex "PortIndex_${macports::os_platform}_${macports::os_major}_${macports::os_arch}/PortIndex"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set platindex "PortIndex_${os_platform}_${os_major}_${os_arch}/PortIndex"
</span> if {[file isfile ${destdir}/$platindex] && [file isfile ${destdir}/${platindex}.quick]} {
file rename -force ${destdir}/$platindex ${destdir}/${platindex}.quick $destdir
} else {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3276,7 +3322,7 @@ proc mportsync {{options {}}} {
</span> if {![dict exists $options no_reindex]} {
global macports::prefix
set indexdir [file dirname [macports::getindex $source]]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[catch {system "${macports::prefix}/bin/portindex [macports::shellescape $indexdir]"}]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[catch {system "${prefix}/bin/portindex [macports::shellescape $indexdir]"}]} {
</span> ui_error "updating PortIndex for $source failed"
}
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3340,13 +3386,14 @@ proc mportsync {{options {}}} {
</span> # <tt>array set</tt> to create an associate array where the port names
# are the keys and the lines from portindex are the values.
proc mportsearch {pattern {case_sensitive yes} {matchstyle regexp} {field name}} {
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ global macports::sources macports::porturl_prefix_map
</span> set matches [list]
set easy [expr {$field eq "name"}]
set found 0
<span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach source $::macports::sources {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach source $sources {
</span> set source [lindex $source 0]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set porturl_prefix [dict get $::macports::porturl_prefix_map $source]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set porturl_prefix [dict get $porturl_prefix_map $source]
</span> macports_try -pass_signal {
set fd [open [macports::getindex $source] r]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3437,19 +3484,19 @@ proc mportsearch {pattern {case_sensitive yes} {matchstyle regexp} {field name}}
</span> # info. See the return value of mportsearch().
# @see mportsearch()
proc mportlookup {name} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::quick_index
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global macports::quick_index macports::sources \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports::porturl_prefix_map
</span>
set sourceno 0
set matches [list]
set normname [string tolower $name]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach source $::macports::sources {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach source $sources {
</span> if {![dict exists $quick_index $sourceno $normname]} {
# no entry in this source, advance to next source
incr sourceno 1
continue
}
set source [lindex $source 0]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set porturl_prefix [dict get $::macports::porturl_prefix_map $source]
</span> # 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.
set offset [dict get $quick_index $sourceno $normname]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3465,7 +3512,7 @@ proc mportlookup {name} {
</span> set portinfo [read $fd $len]
if {[dict exists $portinfo portdir]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- dict set portinfo porturl ${porturl_prefix}/[dict get $portinfo portdir]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dict set portinfo porturl [dict get $porturl_prefix_map $source]/[dict get $portinfo portdir]
</span> }
lappend matches $name $portinfo
} on error {_ eOptions} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3494,11 +3541,12 @@ proc mportlookup {name} {
</span> # info. See the return value of mportsearch().
# @see mportsearch()
proc mportlistall {} {
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ global macports::sources macports::porturl_prefix_map
</span> set matches [list]
set found 0
<span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach source $::macports::sources {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach source $sources {
</span> set source [lindex $source 0]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set porturl_prefix [dict get $::macports::porturl_prefix_map $source]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set porturl_prefix [dict get $porturl_prefix_map $source]
</span> macports_try -pass_signal {
set fd [open [macports::getindex $source] r]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3545,12 +3593,12 @@ proc macports::load_quickindex {name1 name2 op} {
</span> # first if necessary. Private API of macports1.0, do not use this from outside
# macports1.0.
proc _mports_load_quickindex {} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::quick_index
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global macports::quick_index macports::sources
</span>
set quick_index [dict create]
set sourceno 0
<span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach source $::macports::sources {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach source $sources {
</span> unset -nocomplain quicklist
# chop off any tags
set source [lindex $source 0]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3648,7 +3696,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 [dict create {*}[$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;'>@@ -3658,7 +3706,7 @@ proc mportclose {mport} {
</span> incr refcnt -1
ditem_key $mport refcnt $refcnt
if {$refcnt == 0} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- dlist_delete macports::open_mports $mport
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dlist_delete open_mports $mport
</span> set workername [ditem_key $mport workername]
interp delete $workername
#set porturl [ditem_key $mport porturl]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3981,7 +4029,7 @@ proc macports::_active_archs {portname} {
</span>
# print an error message explaining why a port's archs are not provided by a dependency
proc macports::_explain_arch_mismatch {port dep required_archs supported_archs has_universal} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::universal_archs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable universal_archs
</span> if {![macports::ui_isset ports_debug]} {
ui_msg {}
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4121,16 +4169,10 @@ proc macports::_deptypes_for_target {target workername} {
</span> return [list]
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# All valid depends_* options
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-set macports::all_dep_types [list depends_fetch depends_extract depends_patch depends_build depends_lib depends_run depends_test]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# Which depends_* types need to have matching archs when installing
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-set macports::archcheck_install_dep_types [list depends_build depends_lib depends_run]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# Which depends_* types need to have matching archs if used
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-set macports::archcheck_dep_types [list {*}${macports::archcheck_install_dep_types} depends_test]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> # Return true if the given dependency type needs to have matching archs
proc macports::_deptype_needs_archcheck {deptype} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- return [expr {$deptype in ${macports::archcheck_dep_types}}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable archcheck_dep_types
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return [expr {$deptype in ${archcheck_dep_types}}]
</span> }
# selfupdate procedure
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4145,6 +4187,7 @@ proc macports::selfupdate {{options {}} {updatestatusvar {}}} {
</span> # 2 = port name not found in index
# 3 = port not installed
proc macports::upgrade {portname dspec variations options {depscachename {}}} {
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable global_options
</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;'>@@ -4161,8 +4204,8 @@ proc macports::upgrade {portname dspec variations options {depscachename {}}} {
</span> }
# stop upgrade from being called via mportexec as well
set orig_nodeps yes
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists macports::global_options(ports_nodeps)]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::global_options(ports_nodeps) yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![info exists global_options(ports_nodeps)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set global_options(ports_nodeps) yes
</span> set orig_nodeps no
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4170,7 +4213,7 @@ proc macports::upgrade {portname dspec variations options {depscachename {}}} {
</span> set status [macports::_upgrade $portname $dspec $variations $options depscache]
if {!$orig_nodeps} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- unset -nocomplain macports::global_options(ports_nodeps)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ unset -nocomplain global_options(ports_nodeps)
</span> }
return $status
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4178,7 +4221,7 @@ proc macports::upgrade {portname dspec variations options {depscachename {}}} {
</span>
# main internal upgrade procedure
proc macports::_upgrade {portname dspec variations options {depscachename {}}} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::global_variations
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable global_variations
</span>
if {$depscachename ne ""} {
upvar $depscachename depscache
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4245,7 +4288,7 @@ proc macports::_upgrade {portname dspec variations options {depscachename {}}} {
</span> # open porthandle
set porturl [dict get $portinfo porturl]
# Merge in global variants
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set variations [dict merge [array get macports::global_variations] $variations]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set variations [dict merge [array get global_variations] $variations]
</span> ui_debug "fully merged portvariants: $variations"
# Don't inherit requested status from the depending port
dict unset options ports_requested
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4397,13 +4440,14 @@ proc macports::_upgrade {portname dspec variations options {depscachename {}}} {
</span> # Now merge all the variations. Global (i.e. variants.conf) ones are
# overridden by the previous requested variants, which are overridden
# by the currently requested variants.
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set variations [dict merge [array get macports::global_variations] $oldrequestedvariations $variations]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set variations [dict merge [array get global_variations] $oldrequestedvariations $variations]
</span>
ui_debug "new fully merged portvariants: $variations"
# at this point we need to check if a different port will be replacing this one
if {[dict exists $portinfo replaced_by] && ![dict exists $options ports_upgrade_no-replace]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg "$macports::ui_prefix $portname is replaced by [dict get $portinfo replaced_by]"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable ui_prefix
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "$ui_prefix $portname is replaced by [dict get $portinfo replaced_by]"
</span> if {[catch {mportlookup [dict get $portinfo replaced_by]} result]} {
ui_debug $::errorInfo
ui_error "port lookup failed: $result"
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4754,6 +4798,7 @@ proc macports::_upgrade {portname dspec variations options {depscachename {}}} {
</span> # Open the given port, adding +universal if needed to satisfy the arch
# requirements of the dependent mport.
proc macports::_mport_open_with_archcheck {porturl depspec dependent_mport options variations} {
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable archcheck_install_dep_types
</span> if {[catch {set mport [mportopen $porturl $options $variations]} result]} {
ui_debug $::errorInfo
ui_error "Unable to open port ($depspec): $result"
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4773,7 +4818,7 @@ proc macports::_mport_open_with_archcheck {porturl depspec dependent_mport optio
</span> # Check if the dependent used a dep type that needs matching archs
set dependent_portinfo [mportinfo $dependent_mport]
set archcheck_needed 0
<span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach dtype ${macports::archcheck_install_dep_types} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach dtype ${archcheck_install_dep_types} {
</span> if {[dict exists $dependent_portinfo $dtype]
&& [lsearch -exact -nocase [dict get $dependent_portinfo $dtype] $depspec] >= 0} {
set archcheck_needed 1
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4983,7 +5028,8 @@ proc macports::_upgrade_metadata {mport regref is_dryrun} {
</span> proc mportselect {command {group ""} {version {}}} {
ui_debug "mportselect \[$command] \[$group] \[$version]"
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set conf_path ${macports::prefix}/etc/select/$group
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global macports::prefix
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set conf_path ${prefix}/etc/select/$group
</span> if {![file isdirectory $conf_path]} {
return -code error "The specified group '$group' does not exist."
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -5046,21 +5092,21 @@ proc mportselect {command {group ""} {version {}}} {
</span> switch -glob -- $src {
- {
# The source is unavailable for this file.
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set tgt [file join $macports::prefix $tgt]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set tgt [file join $prefix $tgt]
</span> file delete $tgt
ui_debug "rm -f $tgt"
}
/* {
# The source is an absolute path.
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set tgt [file join $macports::prefix $tgt]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set tgt [file join $prefix $tgt]
</span> file delete $tgt
file link -symbolic $tgt $src
ui_debug "ln -sf $src $tgt"
}
default {
# The source is a relative path.
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set src [file join $macports::prefix $src]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set tgt [file join $macports::prefix $tgt]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set src [file join $prefix $src]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set tgt [file join $prefix $tgt]
</span> file delete $tgt
file link -symbolic $tgt $src
ui_debug "ln -sf $src $tgt"
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -5105,13 +5151,13 @@ proc macports::gettmpdir {args} {
</span>
# check if the system we're on can run code of the given architecture
proc macports::arch_runnable {arch} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::os_major macports::os_arch macports::os_platform
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$macports::os_platform eq "darwin"} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$macports::os_major >= 11 && [string first ppc $arch] == 0} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable os_major; variable os_arch; variable os_platform
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$os_platform eq "darwin"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$os_major >= 11 && [string first ppc $arch] == 0} {
</span> return no
<span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {$macports::os_arch eq "i386" && $arch in [list arm64 ppc64]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } elseif {$os_arch eq "i386" && $arch in [list arm64 ppc64]} {
</span> return no
<span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {$macports::os_major <= 8 && $arch eq "x86_64"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } elseif {$os_major <= 8 && $arch eq "x86_64"} {
</span> return no
}
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -5284,9 +5330,10 @@ proc macports::revupgrade_update_binary {fancy_output {revupgrade_progress ""}}
</span> set files_count [llength $files]
if {$files_count > 0} {
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable ui_prefix
</span> registry::write {
try {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg "$macports::ui_prefix Updating database of binaries"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "$ui_prefix Updating database of binaries"
</span> set i 1
if {$fancy_output} {
$revupgrade_progress start
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -5354,7 +5401,8 @@ proc macports::revupgrade_update_cxx_stdlib {fancy_output {revupgrade_progress "
</span> set maybe_cxx_ports [registry::entry search state installed cxx_stdlib -null]
set maybe_cxx_len [llength $maybe_cxx_ports]
if {$maybe_cxx_len > 0} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg "$macports::ui_prefix Updating database of C++ stdlib usage"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable ui_prefix
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "$ui_prefix Updating database of C++ stdlib usage"
</span> set i 1
if {$fancy_output} {
$revupgrade_progress start
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -5401,10 +5449,12 @@ proc macports::revupgrade_update_cxx_stdlib {fancy_output {revupgrade_progress "
</span> # 0 otherwise.
proc macports::revupgrade_scanandrebuild {broken_port_counts_name options} {
upvar $broken_port_counts_name broken_port_counts
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable ui_options; variable ui_prefix
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable cxx_stdlib; variable revupgrade_mode
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set fancy_output [expr {![macports::ui_isset ports_debug] && [info exists macports::ui_options(progress_generic)]}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set fancy_output [expr {![macports::ui_isset ports_debug] && [info exists ui_options(progress_generic)]}]
</span> if {$fancy_output} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set revupgrade_progress $macports::ui_options(progress_generic)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set revupgrade_progress $ui_options(progress_generic)
</span> } else {
set revupgrade_progress ""
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -5417,7 +5467,7 @@ proc macports::revupgrade_scanandrebuild {broken_port_counts_name options} {
</span> set binaries [registry::file search active 1 binary 1]
set binary_count [llength $binaries]
if {$binary_count > 0} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg "$macports::ui_prefix Scanning binaries for linking errors"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "$ui_prefix Scanning binaries for linking errors"
</span> set handle [machista::create_handle]
if {$handle eq "NULL"} {
error "Error creating libmachista handle"
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -5643,9 +5693,9 @@ proc macports::revupgrade_scanandrebuild {broken_port_counts_name options} {
</span>
set broken_ports [list]
if {$num_broken_files == 0} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg "$macports::ui_prefix No broken files found."
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "$ui_prefix No broken files found."
</span> } else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg "$macports::ui_prefix Found $num_broken_files broken file${s}, matching files to ports"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "$ui_prefix Found $num_broken_files broken file${s}, matching files to ports"
</span> set broken_files [lsort -unique $broken_files]
foreach file $broken_files {
set port [registry::entry owner $file]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -5659,23 +5709,23 @@ proc macports::revupgrade_scanandrebuild {broken_port_counts_name options} {
</span> }
# check for mismatched cxx_stdlib
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {${macports::cxx_stdlib} eq "libc++"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${cxx_stdlib} eq "libc++"} {
</span> set wrong_stdlib libstdc++
} else {
set wrong_stdlib libc++
}
set broken_cxx_ports [registry::entry search state installed cxx_stdlib_overridden 0 cxx_stdlib $wrong_stdlib]
foreach cxx_port $broken_cxx_ports {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_info "[$cxx_port name] is using $wrong_stdlib (this installation is configured to use ${macports::cxx_stdlib})"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_info "[$cxx_port name] is using $wrong_stdlib (this installation is configured to use ${cxx_stdlib})"
</span> }
set broken_ports [lsort -unique [concat $broken_ports $broken_cxx_ports]]
if {[llength $broken_ports] == 0} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg "$macports::ui_prefix No broken ports found."
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "$ui_prefix No broken ports found."
</span> return 0
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$macports::revupgrade_mode eq "rebuild"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$revupgrade_mode eq "rebuild"} {
</span> # don't try to rebuild ports that don't exist in the tree
set temp_broken_ports [list]
foreach port $broken_ports {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -5693,7 +5743,7 @@ proc macports::revupgrade_scanandrebuild {broken_port_counts_name options} {
</span> }
if {[llength $temp_broken_ports] == 0} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg "$macports::ui_prefix Broken files found, but all associated ports are not in the index and so cannot be rebuilt."
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "$ui_prefix Broken files found, but all associated ports are not in the index and so cannot be rebuilt."
</span> return 0
}
} else {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -5731,8 +5781,8 @@ proc macports::revupgrade_scanandrebuild {broken_port_counts_name options} {
</span> set num_broken_ports [llength $broken_ports]
set s [expr {$num_broken_ports == 1 ? "" : "s"}]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$macports::revupgrade_mode ne "rebuild"} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg "$macports::ui_prefix Found $num_broken_ports broken port${s}:"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$revupgrade_mode ne "rebuild"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "$ui_prefix Found $num_broken_ports broken port${s}:"
</span> foreach port $broken_ports {
ui_msg " [$port name] @[$port version]_[$port revision][$port variants]"
if {[info exists broken_files_by_port($port)]} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -5747,7 +5797,7 @@ proc macports::revupgrade_scanandrebuild {broken_port_counts_name options} {
</span> return 0
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg "$macports::ui_prefix Found $num_broken_ports broken port${s}, determining rebuild order"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "$ui_prefix Found $num_broken_ports broken port${s}, determining rebuild order"
</span> # broken_ports are the nodes in our graph
# now we need adjacents
foreach port $broken_ports {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -5816,12 +5866,12 @@ proc macports::revupgrade_scanandrebuild {broken_port_counts_name options} {
</span> }
set broken_portnames [list]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists macports::ui_options(questions_yesno)]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg "$macports::ui_prefix Rebuilding in order"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![info exists ui_options(questions_yesno)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "$ui_prefix Rebuilding in order"
</span> }
foreach port $topsort_ports {
lappend broken_portnames [$port name]@[$port version][$port variants]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists macports::ui_options(questions_yesno)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![info exists ui_options(questions_yesno)]} {
</span> ui_msg " [$port name] @[$port version]_[$port revision][$port variants]"
}
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -5829,9 +5879,9 @@ proc macports::revupgrade_scanandrebuild {broken_port_counts_name options} {
</span> ##
# User Interaction Question
# Asking before rebuilding in rev-upgrade
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists macports::ui_options(questions_yesno)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[info exists ui_options(questions_yesno)]} {
</span> ui_msg "You can always run 'port rev-upgrade' again to fix errors."
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set retvalue [$macports::ui_options(questions_yesno) "The following ports will be rebuilt:" "TestCase#1" $broken_portnames {y} 0]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set retvalue [$ui_options(questions_yesno) "The following ports will be rebuilt:" "TestCase#1" $broken_portnames {y} 0]
</span> if {$retvalue == 1} {
# quit as user answered 'no'
#foreach p $topsort_ports {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -5839,13 +5889,14 @@ proc macports::revupgrade_scanandrebuild {broken_port_counts_name options} {
</span> #}
return 0
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- unset macports::ui_options(questions_yesno)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ unset ui_options(questions_yesno)
</span> }
# shared depscache for all ports that are going to be rebuilt
array set depscache {}
set status 0
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set my_options [array get macports::global_options]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable global_options
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set my_options [array get global_options]
</span> dict set my_options ports_revupgrade yes
# Depending on the options, calling macports::upgrade could
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -5894,11 +5945,11 @@ proc macports::revupgrade_scanandrebuild {broken_port_counts_name options} {
</span> # Usage: path_is_in_prefix path_to_test
# Returns true if the path is in the prefix, false otherwise
proc macports::path_is_in_prefix {path} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::prefix macports::applications_dir
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[string first $macports::prefix $path] == 0} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable prefix; variable applications_dir
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[string first $prefix $path] == 0} {
</span> return yes
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[string first $macports::applications_dir $path] == 0} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[string first $applications_dir $path] == 0} {
</span> return yes
}
return no
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -5984,16 +6035,18 @@ proc macports::load_ping_cache {name1 name2 op} {
</span>
# get cached ping time for host, modified by blacklist and preferred list
proc macports::get_pingtime {host} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::ping_cache macports::host_cache
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable host_cache
</span>
if {![dict exists $host_cache $host]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach pattern $::macports::host_blacklist {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable host_blacklist
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach pattern $host_blacklist {
</span> if {[string match -nocase $pattern $host]} {
dict set host_cache $host -1
return -1
}
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach pattern $::macports::preferred_hosts {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable preferred_hosts
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach pattern $preferred_hosts {
</span> if {[string match -nocase $pattern $host]} {
dict set host_cache $host 1
return 1
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -6004,6 +6057,8 @@ proc macports::get_pingtime {host} {
</span> if {[dict get $host_cache $host] != 0} {
return [dict get $host_cache $host]
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable ping_cache
</span> if {[dict exists $ping_cache $host]} {
# expire entries after 1 day
if {[clock seconds] - [lindex [dict get $ping_cache $host] 1] <= 86400} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -6015,7 +6070,8 @@ proc macports::get_pingtime {host} {
</span>
# cache a ping time of ms for host
proc macports::set_pingtime {host ms} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- dict set ::macports::ping_cache $host [list $ms [clock seconds]]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable ping_cache
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dict set ping_cache $host [list $ms [clock seconds]]
</span> }
# Deferred loading of compiler version cache
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -6101,19 +6157,21 @@ proc macports::get_tool_path {tool} {
</span>
# read and cache archive_sites.conf (called from port1.0 code)
proc macports::get_archive_sites_conf_values {} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::archive_sites_conf_values macports::autoconf::macports_conf_path
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable archive_sites_conf_values
</span> if {![info exists archive_sites_conf_values]} {
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ global macports::autoconf::macports_conf_path
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable os_platform; variable os_major
</span> set archive_sites_conf_values [list]
set all_names [list]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set defaults_list {applications_dir /Applications/MacPorts prefix /opt/local type tbz2}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$macports::os_platform eq "darwin" && $macports::os_major <= 12} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set defaults_list [list applications_dir /Applications/MacPorts prefix /opt/local type tbz2]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$os_platform eq "darwin" && $os_major <= 12} {
</span> lappend defaults_list cxx_stdlib libstdc++ delete_la_files no
} else {
lappend defaults_list cxx_stdlib libc++ delete_la_files yes
}
array set defaults $defaults_list
set conf_file ${macports_conf_path}/archive_sites.conf
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set conf_options {applications_dir cxx_stdlib delete_la_files frameworks_dir name prefix type urls}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set conf_options [list applications_dir cxx_stdlib delete_la_files frameworks_dir name prefix type urls]
</span> set line_re {^(\w+)([ \t]+(.*))?$}
if {[file isfile $conf_file]} {
set fd [open $conf_file r]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -6198,10 +6256,11 @@ proc macports::unobscure_maintainers {list} {
</span>
# Get actual number of parallel jobs based on buildmakejobs, which may
# be 0 for automatic selection.
<span style='display:block; white-space:pre;background:#ffe0e0;'>-proc macports:get_parallel_jobs {{mem_restrict yes}} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[string is integer -strict $::macports::buildmakejobs] && $::macports::buildmakejobs > 0} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set jobs $::macports::buildmakejobs
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {$::macports::os_platform eq "darwin" && $::macports::buildmakejobs == 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+proc macports::get_parallel_jobs {{mem_restrict yes}} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable buildmakejobs; variable os_platform
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[string is integer -strict $buildmakejobs] && $buildmakejobs > 0} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set jobs $buildmakejobs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } elseif {$os_platform eq "darwin" && $buildmakejobs == 0
</span> && ![catch {sysctl hw.activecpu} cpus]} {
set jobs $cpus
if {$mem_restrict && ![catch {sysctl hw.memsize} memsize]
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/macports1.0/reclaim.tcl b/src/macports1.0/reclaim.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 5a7cf4222..c666110e2 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/macports1.0/reclaim.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/macports1.0/reclaim.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -82,9 +82,9 @@ namespace eval reclaim {
</span> set last_run_contents [read_last_run_file]
if {$last_run_contents eq ""} {
set msg "This appears to be the first time you have run 'port reclaim'."
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists macports::ui_options(questions_yesno)]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set retval [$macports::ui_options(questions_yesno) $msg "ReclaimPrompt" "" {y} 0 "Would you like to be reminded to run it every two weeks?"]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global macports::ui_options
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[info exists ui_options(questions_yesno)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set retval [$ui_options(questions_yesno) $msg "ReclaimPrompt" "" {y} 0 "Would you like to be reminded to run it every two weeks?"]
</span> if {$retval != 0} {
# User said no, store disabled flag
set last_run_contents disabled
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -107,12 +107,12 @@ namespace eval reclaim {
</span>
proc remove_builds {} {
# Delete portdbpath/build directories
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::portdbpath
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global macports::portdbpath macports::ui_prefix macports::ui_options
</span>
# The root build directory location
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set root_build [file join ${macports::portdbpath} build]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set root_build [file join ${portdbpath} build]
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg "$macports::ui_prefix Build location: ${root_build}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "$ui_prefix Build location: ${root_build}"
</span>
if {[macports::global_option_isset ports_dryrun]} {
ui_msg "Deleting... (dry run)"
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -127,8 +127,8 @@ namespace eval reclaim {
</span> }
set retval 0
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists macports::ui_options(questions_yesno)]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set retval [$macports::ui_options(questions_yesno) "" "" "" "y" 0 "Would you like to delete all the build directories?"]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[info exists ui_options(questions_yesno)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set retval [$ui_options(questions_yesno) "" "" "" "y" 0 "Would you like to delete all the build directories?"]
</span> }
if {${retval} == 0} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -144,34 +144,34 @@ namespace eval reclaim {
</span>
proc remove_ccache {} {
# Delete everything under ccache directory - default is build/.ccache
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::ccache_dir
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global macports::ccache_dir macports::ui_prefix macports::ui_options
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![file exists ${macports::ccache_dir}]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_info [msgcat::mc "Skipping deletion of ccache directory: %s does not exist." $macports::ccache_dir]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![file exists ${ccache_dir}]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_info [msgcat::mc "Skipping deletion of ccache directory: %s does not exist." $ccache_dir]
</span> return
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg "$macports::ui_prefix ccache location: ${macports::ccache_dir}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "$ui_prefix ccache location: ${ccache_dir}"
</span>
if {[macports::global_option_isset ports_dryrun]} {
ui_msg "Deleting... (dry run)"
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_info [msgcat::mc "Skipping deletion of everything under %s (dry run)" $macports::ccache_dir]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_info [msgcat::mc "Skipping deletion of everything under %s (dry run)" $ccache_dir]
</span> return
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set ccachedirs [glob -nocomplain -directory $macports::ccache_dir *]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set ccachedirs [glob -nocomplain -directory $ccache_dir *]
</span> if {[llength $ccachedirs] == 0} {
ui_info [msgcat::mc "No ccache directories to delete"]
return
}
set retval 0
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists macports::ui_options(questions_yesno)]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set retval [$macports::ui_options(questions_yesno) "" "" "" "y" 0 "Would you like to delete everything under the ccache directory?"]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[info exists ui_options(questions_yesno)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set retval [$ui_options(questions_yesno) "" "" "" "y" 0 "Would you like to delete everything under the ccache directory?"]
</span> }
if {${retval} == 0} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_info [msgcat::mc "Deleting everything under %s" $macports::ccache_dir]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_info [msgcat::mc "Deleting everything under %s" $ccache_dir]
</span> macports_try -pass_signal {
file delete -force -- {*}$ccachedirs
} on error {eMessage} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -220,7 +220,8 @@ namespace eval reclaim {
</span> # return the variations that would be used when upgrading a port
# installed with the given requested variants
proc get_variations {installed_variants} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set vararray [dict create {*}[array get macports::global_variations]]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global macports::global_variations
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set vararray [dict create {*}[array get global_variations]]
</span> set splitvariant [split $installed_variants -]
set minusvariant [lrange $splitvariant 1 end]
set splitvariant [split [lindex $splitvariant 0] +]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -236,16 +237,17 @@ namespace eval reclaim {
</span>
proc load_distfile_cache {varname} {
upvar $varname var
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ global macports::portdbpath macports::global_variations
</span> macports_try -pass_signal {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set fd [open |[list $macports::autoconf::gzip_path -d < [file join $macports::portdbpath reclaim distfiles.gz]] r]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set fd [open |[list $macports::autoconf::gzip_path -d < [file join $portdbpath reclaim distfiles.gz]] r]
</span> set data [gets $fd]
close $fd
set var [dict create {*}$data]
set cached_gv [dict get $var :global_variations]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set allkeys [lsort -unique [concat [dict keys $cached_gv] [array names macports::global_variations]]]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set allkeys [lsort -unique [concat [dict keys $cached_gv] [array names global_variations]]]
</span> foreach key $allkeys {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![dict exists $cached_gv $key] || ![info exists macports::global_variations($key)]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- || [dict get $cached_gv $key] ne $macports::global_variations($key)} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![dict exists $cached_gv $key] || ![info exists global_variations($key)]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ || [dict get $cached_gv $key] ne $global_variations($key)} {
</span> # global variations changed, so cache is invalidated
set var [dict create]
break
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -260,10 +262,11 @@ namespace eval reclaim {
</span> }
proc save_distfile_cache {cache} {
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ global macports::portdbpath macports::global_variations
</span> macports_try -pass_signal {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- file mkdir [file join $macports::portdbpath reclaim]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set fd [open |[list $macports::autoconf::gzip_path > [file join $macports::portdbpath reclaim distfiles.gz]] w]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- dict set cache :global_variations [array get macports::global_variations]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ file mkdir [file join $portdbpath reclaim]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set fd [open |[list $macports::autoconf::gzip_path > [file join $portdbpath reclaim distfiles.gz]] w]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dict set cache :global_variations [array get global_variations]
</span> puts $fd [dict get $cache]
close $fd
} on error {eMessage} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -279,24 +282,26 @@ namespace eval reclaim {
</span> # Returns:
# 0 on successful execution
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ global macports::portdbpath macports::user_home macports::ui_options \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports::ui_prefix
</span> # The root and home distfile folder locations, respectively.
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set root_dist [file join ${::macports::portdbpath} distfiles]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set home_dist ${::macports::user_home}/.macports$root_dist
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set root_dist [file join ${portdbpath} distfiles]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set home_dist ${user_home}/.macports$root_dist
</span>
set files_in_use [list]
set fancyOutput [expr { ![macports::ui_isset ports_debug] \
&& ![macports::ui_isset ports_verbose] \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- && [info exists macports::ui_options(progress_generic)]}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ && [info exists ui_options(progress_generic)]}]
</span> if {$fancyOutput} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set progress $macports::ui_options(progress_generic)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set progress $ui_options(progress_generic)
</span> } else {
# provide a no-op if there is no progress function
proc noop {args} {}
set progress noop
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg "$macports::ui_prefix Building list of distfiles still in use"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "$ui_prefix Building list of distfiles still in use"
</span> load_distfile_cache distfile_cache_prev
set distfile_cache_new [dict create]
set installed_ports [registry::entry imaged]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -388,7 +393,7 @@ namespace eval reclaim {
</span>
$progress finish
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg "$macports::ui_prefix Searching for unused distfiles"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "$ui_prefix Searching for unused distfiles"
</span>
# sort so we can use binary search in walk_files
set files_in_use [lsort -unique $files_in_use]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -412,8 +417,8 @@ namespace eval reclaim {
</span> array set alternatives {d delete k keep l list}
while 1 {
set retstring "d"
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists macports::ui_options(questions_alternative)]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set retstring [$macports::ui_options(questions_alternative) [msgcat::mc \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[info exists ui_options(questions_alternative)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set retstring [$ui_options(questions_alternative) [msgcat::mc \
</span> "Found %d files (total %s) that are no longer needed and can be deleted." \
$num_superfluous_files [bytesize $size_superfluous_files]] "deleteFilesQ" "alternatives" {k}]
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -487,7 +492,8 @@ namespace eval reclaim {
</span> }
proc read_last_run_file {} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set path [file join ${macports::portdbpath} last_reclaim]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global macports::portdbpath
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set path [file join ${portdbpath} last_reclaim]
</span>
set fd -1
set contents ""
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -505,7 +511,8 @@ namespace eval reclaim {
</span> }
proc write_last_run_file {contents} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set path [file join ${macports::portdbpath} last_reclaim]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global macports::portdbpath
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set path [file join ${portdbpath} last_reclaim]
</span> set fd -1
macports_try -pass_signal {
set fd [open $path w]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -551,9 +558,9 @@ namespace eval reclaim {
</span> ui_debug "Checking time since last reclaim run"
if {[clock seconds] - $time > 1209600} {
set msg "You haven't run 'sudo port reclaim' in two weeks. It's recommended you run this regularly to reclaim disk space."
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[file writable $macports::portdbpath] && [info exists macports::ui_options(questions_yesno)]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set retval [$macports::ui_options(questions_yesno) $msg "ReclaimPrompt" "" {y} 0 "Would you like to run it now?"]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global macports::portdbpath macports::ui_options
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[file writable $portdbpath] && [info exists ui_options(questions_yesno)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set retval [$ui_options(questions_yesno) $msg "ReclaimPrompt" "" {y} 0 "Would you like to run it now?"]
</span> if {$retval == 0} {
# User said yes, run port reclaim
return [macports::reclaim_main {}]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -625,7 +632,8 @@ namespace eval reclaim {
</span> set inactive_names [list]
set inactive_count 0
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg "$macports::ui_prefix Checking for inactive ports"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global macports::ui_prefix macports::ui_options
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "$ui_prefix Checking for inactive ports"
</span>
foreach port [registry::entry imaged] {
if {[$port state] eq "imaged"} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -646,8 +654,8 @@ namespace eval reclaim {
</span>
} else {
set retval 0
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists macports::ui_options(questions_yesno)]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set retval [$macports::ui_options(questions_yesno) "Inactive ports found:" "" $inactive_names "y" 0 "Would you like to uninstall them?"]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[info exists ui_options(questions_yesno)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set retval [$ui_options(questions_yesno) "Inactive ports found:" "" $inactive_names "y" 0 "Would you like to uninstall them?"]
</span> }
if {${retval} == 0 && [macports::global_option_isset ports_dryrun]} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -691,7 +699,8 @@ namespace eval reclaim {
</span>
set isrequested [dict create]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg "$macports::ui_prefix Checking for unnecessary unrequested ports"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global macports::ui_prefix macports::ui_options
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "$ui_prefix Checking for unnecessary unrequested ports"
</span>
foreach port [sort_portlist_by_dependendents [registry::entry imaged]] {
set portname [$port name]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -731,8 +740,8 @@ namespace eval reclaim {
</span>
} else {
set retval 0
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists macports::ui_options(questions_yesno)]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set retval [$macports::ui_options(questions_yesno) "Unrequested ports without requested dependents found:" "" $unnecessary_names "y" 0 "Would you like to uninstall them?"]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[info exists ui_options(questions_yesno)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set retval [$ui_options(questions_yesno) "Unrequested ports without requested dependents found:" "" $unnecessary_names "y" 0 "Would you like to uninstall them?"]
</span> }
if {${retval} == 0 && [macports::global_option_isset ports_dryrun]} {
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/macports1.0/selfupdate.tcl b/src/macports1.0/selfupdate.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 1f9d3bfd4..9b0d416bd 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/macports1.0/selfupdate.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/macports1.0/selfupdate.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -37,10 +37,9 @@ namespace eval selfupdate {
</span> }
proc selfupdate::main {{options {}} {updatestatusvar {}}} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::prefix macports::portdbpath macports::rsync_server macports::rsync_dir \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global macports::portdbpath macports::rsync_server macports::rsync_dir \
</span> macports::rsync_options macports::autoconf::macports_version \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- macports::autoconf::rsync_path tcl_platform macports::autoconf::openssl_path \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- macports::autoconf::tar_path
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports::autoconf::rsync_path macports::ui_prefix
</span>
# variable that indicates whether we actually updated base
if {$updatestatusvar ne ""} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -73,7 +72,7 @@ proc selfupdate::main {{options {}} {updatestatusvar {}}} {
</span> ui_debug "MacPorts sources location: $mp_source_path"
# sync the MacPorts sources
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg "$macports::ui_prefix Updating MacPorts base sources using rsync"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "$ui_prefix Updating MacPorts base sources using rsync"
</span> macports_try -pass_signal {
system "$rsync_path ${rsync_options}${include_options} [macports::shellescape $rsync_url] [macports::shellescape $mp_source_path]"
} on error {eMessage} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -82,12 +81,13 @@ proc selfupdate::main {{options {}} {updatestatusvar {}}} {
</span>
if {$is_tarball} {
# verify signature for tarball
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::archivefetch_pubkeys macports::hfscompression
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set openssl [macports::findBinary openssl $macports::autoconf::openssl_path]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global macports::archivefetch_pubkeys macports::hfscompression \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports::autoconf::openssl_path
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set openssl [macports::findBinary openssl $openssl_path]
</span> set tarball ${mp_source_path}/${tarfile}
set signature ${tarball}.rmd160
set verified 0
<span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach pubkey $macports::archivefetch_pubkeys {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach pubkey $archivefetch_pubkeys {
</span> macports_try -pass_signal {
exec $openssl dgst -ripemd160 -verify $pubkey -signature $signature $tarball
set verified 1
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -102,13 +102,14 @@ proc selfupdate::main {{options {}} {updatestatusvar {}}} {
</span> return -code error "Failed to verify signature for MacPorts source!"
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {${macports::hfscompression} && [getuid] == 0 &&
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${hfscompression} && [getuid] == 0 &&
</span> ![catch {macports::binaryInPath bsdtar}] &&
![catch {exec bsdtar -x --hfsCompression < /dev/null >& /dev/null}]} {
ui_debug "Using bsdtar with HFS+ compression (if valid)"
set tar "bsdtar --hfsCompression"
} else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set tar [macports::findBinary tar $macports::autoconf::tar_path]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global macports::autoconf::tar_path
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set tar [macports::findBinary tar $tar_path]
</span> }
# extract tarball and move into place
file mkdir ${mp_source_path}/tmp
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -126,7 +127,7 @@ proc selfupdate::main {{options {}} {updatestatusvar {}}} {
</span> }
# echo current MacPorts version
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg "MacPorts base version $macports::autoconf::macports_version installed,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "MacPorts base version $macports_version installed,"
</span>
if {[dict exists $options ports_force] && [dict get $options ports_force]} {
set use_the_force_luke yes
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -150,7 +151,7 @@ proc selfupdate::main {{options {}} {updatestatusvar {}}} {
</span> }
# check if we we need to rebuild base
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set comp [vercmp $macports_version_new $macports::autoconf::macports_version]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set comp [vercmp $macports_version_new $macports_version]
</span>
# syncing ports tree.
if {![dict exists $options ports_selfupdate_no-sync] || ![dict get $options ports_selfupdate_no-sync]} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -170,10 +171,13 @@ proc selfupdate::main {{options {}} {updatestatusvar {}}} {
</span>
if {$use_the_force_luke || $comp > 0} {
if {[dict exists $options ports_dryrun] && [dict get $options ports_dryrun]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg "$macports::ui_prefix MacPorts base is outdated, selfupdate would install $macports_version_new (dry run)"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "$ui_prefix MacPorts base is outdated, selfupdate would install $macports_version_new (dry run)"
</span> } else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg "$macports::ui_prefix MacPorts base is outdated, installing new version $macports_version_new"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "$ui_prefix MacPorts base is outdated, installing new version $macports_version_new"
</span>
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ global macports::developer_dir macports::macos_version_major \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports::os_major macports::os_platform macports::prefix \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ tcl_platform
</span> # get installation user/group and permissions
set owner [file attributes $prefix -owner]
set group [file attributes $prefix -group]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -185,7 +189,7 @@ proc selfupdate::main {{options {}} {updatestatusvar {}}} {
</span>
set configure_args "--prefix=[macports::shellescape $prefix] --with-install-user=[macports::shellescape $owner] --with-install-group=[macports::shellescape $group] --with-directory-mode=[macports::shellescape $perms]"
# too many users have an incompatible readline in /usr/local, see ticket #10651
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$tcl_platform(os) ne "Darwin" || $prefix eq "/usr/local"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$os_platform ne "darwin" || $prefix eq "/usr/local"
</span> || ([glob -nocomplain /usr/local/lib/lib{readline,history}*] eq "" && [glob -nocomplain /usr/local/include/readline/*.h] eq "")} {
append configure_args " --enable-readline"
} else {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -199,8 +203,8 @@ proc selfupdate::main {{options {}} {updatestatusvar {}}} {
</span> # Choose a sane compiler and SDK
set cc_arg {}
set sdk_arg {}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set jobs [macports:get_parallel_jobs yes]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$::macports::os_platform eq "darwin"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set jobs [macports::get_parallel_jobs yes]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$os_platform eq "darwin"} {
</span> catch {exec /usr/bin/cc 2>@1} output
set output [join [lrange [split $output "\n"] 0 end-1] "\n"]
if {[string match -nocase *license* $output]} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -210,18 +214,18 @@ proc selfupdate::main {{options {}} {updatestatusvar {}}} {
</span> }
set cc_arg "CC=/usr/bin/cc "
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$::macports::os_major >= 18 || ![file exists /usr/include/sys/cdefs.h]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$os_major >= 18 || ![file exists /usr/include/sys/cdefs.h]} {
</span> set cltpath /Library/Developer/CommandLineTools
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set sdk_version $::macports::macos_version_major
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set sdk_version $macos_version_major
</span> set check_dirs [list ${cltpath}/SDKs \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ${::macports::developer_dir}/Platforms/MacOSX.platform/Developer/SDKs \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${::macports::developer_dir}/SDKs]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${developer_dir}/Platforms/MacOSX.platform/Developer/SDKs \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${developer_dir}/SDKs]
</span> foreach check_dir $check_dirs {
set sdk ${check_dir}/MacOSX${sdk_version}.sdk
if {[file exists $sdk]} {
set sdk_arg "SDKROOT=[macports::shellescape ${sdk}] "
break
<span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {$::macports::os_major >= 20} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } elseif {$os_major >= 20} {
</span> set matches [glob -nocomplain -directory ${check_dir} MacOSX${sdk_version}*.sdk]
if {[llength $matches] > 1} {
set matches [lsort -decreasing -command vercmp $matches]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -247,9 +251,9 @@ proc selfupdate::main {{options {}} {updatestatusvar {}}} {
</span> }
}
} elseif {$comp < 0} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg "$macports::ui_prefix MacPorts base is probably master or a release candidate"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "$ui_prefix MacPorts base is probably master or a release candidate"
</span> } else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg "$macports::ui_prefix MacPorts base is already the latest version"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "$ui_prefix MacPorts base is already the latest version"
</span> }
# set the MacPorts sources to the right owner
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/macports1.0/tests/macports.test b/src/macports1.0/tests/macports.test
</span><span style='display:block; white-space:pre;color:#808080;'>index feb5a9b1b..0e3f9b950 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/macports1.0/tests/macports.test
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/macports1.0/tests/macports.test
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -50,8 +50,7 @@ test mportinfo {
</span> set mport [mportopen file://${pwd}]
} -body {
set res [mportinfo $mport]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- catch {array set PortInfo $res}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists PortInfo(canonical_active_variants)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![dict exists $res canonical_active_variants]} {
</span> return "FAIL: cannot get ::PortInfo"
}
return "Mport info successful."
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/port/portindex.tcl b/src/port/portindex.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 197c1f047..156caa098 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/port/portindex.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/port/portindex.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -204,7 +204,7 @@ proc init_threads {} {
</span> append ::worker_init_script \
[list set oldmtime $::oldmtime] \n
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set ::maxjobs [macports:get_parallel_jobs no]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set ::maxjobs [macports::get_parallel_jobs no]
</span> set ::poolid [tpool::create -minworkers $::maxjobs -maxworkers $::maxjobs -initcmd $::worker_init_script]
set ::pending_jobs [dict create]
set ::nextjobnum 0
</pre><pre style='margin:0'>
</pre>