<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/4b91d3873aba38aa557d0f2b84fe29fb658eaccf">https://github.com/macports/macports-base/commit/4b91d3873aba38aa557d0f2b84fe29fb658eaccf</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 4b91d3873aba38aa557d0f2b84fe29fb658eaccf
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Wed Dec 28 21:21:02 2016 +1100
<span style='display:block; white-space:pre;color:#404040;'> Remove unused global calls
</span>---
src/macports1.0/macports.tcl | 27 +++++++++-----------------
src/port/port.tcl | 9 +--------
src/port/portindex.tcl | 4 ++--
src/port/portmirror.tcl | 1 -
src/port1.0/fetch_common.tcl | 2 +-
src/port1.0/portclean.tcl | 6 +++---
src/port1.0/portdepends.tcl | 1 -
src/port1.0/portdistfiles.tcl | 2 +-
src/port1.0/portsandbox.tcl | 2 +-
src/port1.0/portutil.tcl | 40 ++++++++++++++++++---------------------
src/registry2.0/portimage.tcl | 4 +---
src/registry2.0/portuninstall.tcl | 3 +--
src/registry2.0/registry.tcl | 3 +--
13 files changed, 39 insertions(+), 65 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 215fb87..b607c9f 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;'>@@ -132,8 +132,6 @@ proc macports::global_option_isset {val} {
</span> }
proc macports::init_logging {mport} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::channels macports::portdbpath
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> if {[getuid] == 0 && [geteuid] != 0} {
seteuid 0; setegid 0
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -144,8 +142,6 @@ proc macports::init_logging {mport} {
</span> return 0
}
proc macports::ch_logging {mport} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global ::debuglog ::debuglogname
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> set portname [_mportkey $mport subport]
set portpath [_mportkey $mport portpath]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -162,7 +158,6 @@ proc macports::ch_logging {mport} {
</span> puts $::debuglog version:1
}
proc macports::push_log {mport} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global ::logstack ::logenabled ::debuglog ::debuglogname
</span> if {![info exists ::logenabled]} {
if {[macports::init_logging $mport] == 0} {
set ::logenabled yes
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -185,7 +180,6 @@ proc macports::push_log {mport} {
</span> }
proc macports::pop_log {} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global ::logenabled ::logstack ::debuglog ::debuglogname
</span> if {![info exists ::logenabled]} {
return -code error "pop_log called before push_log"
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -213,7 +207,7 @@ proc set_phase {phase} {
</span> }
proc ui_message {priority prefix args} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::channels ::debuglog macports::current_phase
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global macports::channels macports::current_phase
</span>
#
# validate $args
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -257,7 +251,7 @@ proc ui_message {priority prefix args} {
</span> }
proc macports::ui_init {priority args} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::channels ::debuglog
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global macports::channels
</span> set default_channel [macports::ui_channels_default $priority]
# Get the list of channels.
if {[llength [info commands ui_channels]] > 0} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1652,8 +1646,6 @@ proc macports::getportdir {url} {
</span> # @param fallback fall back to the default source tree
# @return path to the _resources directory or the path to the fallback
proc macports::getportresourcepath {url {path {}} {fallback yes}} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::sources_default
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> set protocol [getprotocol $url]
switch -- $protocol {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2018,7 +2010,6 @@ proc _mportexec {target mport} {
</span> return 0
} else {
# An error occurred.
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global ::logenabled ::debuglogname
</span> ui_debug $::errorInfo
if {[info exists ::logenabled] && $::logenabled && [info exists ::debuglogname]} {
ui_error "See $::debuglogname for details."
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2188,7 +2179,6 @@ proc mportexec {mport target} {
</span> $workername eval {eval_targets clean}
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global ::logenabled ::debuglogname
</span> if {$result != 0 && [info exists ::logenabled] && $::logenabled && [info exists ::debuglogname]} {
ui_error "See $::debuglogname for details."
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2471,8 +2461,8 @@ proc macports::UpdateVCS {cmd dir} {
</span> }
proc mportsync {{optionslist {}}} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::sources macports::portdbpath macports::rsync_options \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- tcl_platform macports::portverbose macports::autoconf::rsync_path \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global macports::sources macports::rsync_options \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports::portverbose macports::autoconf::rsync_path \
</span> macports::autoconf::tar_path macports::autoconf::openssl_path \
macports::ui_options
array set options $optionslist
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2928,7 +2918,7 @@ 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::portdbpath macports::sources macports::quick_index
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global macports::sources macports::quick_index
</span>
set sourceno 0
set matches [list]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3168,7 +3158,8 @@ proc mportinfo {mport} {
</span> }
proc mportclose {mport} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::open_mports macports::extracted_portdirs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global macports::open_mports
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #macports::extracted_portdirs
</span> set refcnt [ditem_key $mport refcnt]
incr refcnt -1
ditem_key $mport refcnt $refcnt
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3180,7 +3171,7 @@ proc mportclose {mport} {
</span> interp delete $workername
}
set porturl [ditem_key $mport porturl]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists macports::extracted_portdirs($porturl)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #if {[info exists macports::extracted_portdirs($porturl)]} {
</span> # TODO port.tcl calls mportopen multiple times on the same port to
# determine a number of attributes and will close the port after
# each call. $macports::extracted_portdirs($porturl) will however
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3190,7 +3181,7 @@ proc mportclose {mport} {
</span> # port.tcl code to delay mportclose until the end.
#ui_debug "Removing temporary port directory $macports::extracted_portdirs($porturl)"
#file delete -force $macports::extracted_portdirs($porturl)
<span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #}
</span> ditem_delete $mport
}
}
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/port/port.tcl b/src/port/port.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index f0c18bc..02612a0 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/port/port.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/port/port.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -282,7 +282,7 @@ proc registry_installed {portname {portversion ""}} {
</span> }
proc entry_for_portlist {portentry} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global global_options global_variations
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global global_options
</span>
# Each portlist entry currently has the following elements in it:
# url if any
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4246,7 +4246,6 @@ proc match {s} {
</span> # 0 none Does not expect any text argument
# 1 strings Expects some strings as text argument
# 2 ports Wants an expanded list of ports as text argument
<span style='display:block; white-space:pre;background:#ffe0e0;'>-global action_array
</span>
# Define global constants
const ACTION_ARGS_NONE 0
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4409,7 +4408,6 @@ proc action_needs_portlist { action } {
</span> # Syntax if {option argn}
# Where option is the name of the option and argn specifies how many arguments
# this argument takes
<span style='display:block; white-space:pre;background:#ffe0e0;'>-global cmd_opts_array
</span> array set cmd_opts_array {
edit {{editor 1}}
info {category categories conflicts depends_fetch depends_extract
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4494,7 +4492,6 @@ proc cmd_option_matches {action option} {
</span> proc parse_options { action ui_options_name global_options_name } {
upvar $ui_options_name ui_options
upvar $global_options_name global_options
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global cmdname cmd_opts_array
</span>
while {[moreargs]} {
set arg [lookahead]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -5318,7 +5315,6 @@ namespace eval portclient::notifications {
</span> # Print port notifications.
#
proc display {} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global env
</span> variable notificationsToPrint
# Display notes at the end of the activation phase.
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -5673,9 +5669,6 @@ array set private_options {}
</span> # We do this here to save it in the boot_env, in case we determined it manually
term_init_size
<span style='display:block; white-space:pre;background:#ffe0e0;'>-global env boot_env argv0 cmdname argc argv cmd_argc cmd_argv cmd_argn \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- current_portdir global_options_base exit_status
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> # Save off a copy of the environment before mportinit monkeys with it
array set boot_env [array get env]
<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 9f08452..a8646ee 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;'>@@ -97,8 +97,8 @@ proc _open_port {portinfo_name portdir absportdir port_options_name {subport {}}
</span> }
proc pindex {portdir} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global target oldfd oldmtime newest qindex fd directory outdir stats full_reindex \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_options port_options save_prefix keepkeys
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global oldmtime newest qindex directory stats full_reindex \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_options port_options save_prefix
</span>
set qname [string tolower [file tail $portdir]]
set absportdir [file join $directory $portdir]
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/port/portmirror.tcl b/src/port/portmirror.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index f5021fa..b63c9f2 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/port/portmirror.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/port/portmirror.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -11,7 +11,6 @@ package require macports
</span> package require Pextlib
# Globals
<span style='display:block; white-space:pre;background:#ffe0e0;'>-global distfiles_filemap
</span> array set ui_options [list]
array set global_options [list]
array set global_variations [list]
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/port1.0/fetch_common.tcl b/src/port1.0/fetch_common.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index af2371b..4f48c3b 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/port1.0/fetch_common.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/port1.0/fetch_common.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -83,7 +83,7 @@ proc portfetch::assemble_url {site distfile} {
</span> # For a given mirror site type, e.g. "gnu" or "x11", check to see if there's a
# pre-registered set of sites, and if so, return them.
proc portfetch::mirror_sites {mirrors tag subdir mirrorfile} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global UI_PREFIX name dist_subdir global_mirror_site
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global name dist_subdir global_mirror_site
</span>
if {[file exists $mirrorfile]} {
source $mirrorfile
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/port1.0/portclean.tcl b/src/port1.0/portclean.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 03300bb..948d044 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/port1.0/portclean.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/port1.0/portclean.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -49,7 +49,7 @@ namespace eval portclean {
</span> set_ui_prefix
proc portclean::clean_start {args} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global UI_PREFIX prefix
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global UI_PREFIX
</span>
ui_notice "$UI_PREFIX [format [msgcat::mc "Cleaning %s"] [option subport]]"
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -175,7 +175,7 @@ proc portclean::clean_dist {args} {
</span> }
proc portclean::clean_work {args} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global portbuildpath subbuildpath worksymlink portpath
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global portbuildpath subbuildpath worksymlink
</span>
if {[file isdirectory $subbuildpath]} {
ui_debug "Removing directory: ${subbuildpath}"
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -200,7 +200,7 @@ proc portclean::clean_work {args} {
</span> return 0
}
proc portclean::clean_logs {args} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global portpath portbuildpath worksymlink portverbose keeplogs prefix subport
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global portpath subport
</span> set logpath [getportlogpath $portpath]
set subdir [file join $logpath $subport]
if {[file isdirectory $subdir]} {
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/port1.0/portdepends.tcl b/src/port1.0/portdepends.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 322b84e..7d15a56 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/port1.0/portdepends.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/port1.0/portdepends.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -54,7 +54,6 @@ option_proc depends portdepends::validate_depends_options_new
</span> set_ui_prefix
proc portdepends::validate_depends_options {option action {value ""}} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global targets
</span> switch $action {
set {
foreach depspec $value {
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/port1.0/portdistfiles.tcl b/src/port1.0/portdistfiles.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 6fdfc2a..a7caf6a 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/port1.0/portdistfiles.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/port1.0/portdistfiles.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -52,7 +52,7 @@ proc portdistfiles::distfiles_start {args} {
</span> }
proc portdistfiles::distfiles_main {args} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global UI_PREFIX master_sites patch_sites patchfiles checksums_array \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global master_sites patch_sites patchfiles checksums_array \
</span> portdbpath dist_subdir all_dist_files
# give up on ports that do not provide URLs
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/port1.0/portsandbox.tcl b/src/port1.0/portsandbox.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 2c2ac84..6d0c841 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/port1.0/portsandbox.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/port1.0/portsandbox.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -41,7 +41,7 @@ default portsandbox_profile {}
</span> # command line usage would be:
# sandbox-exec -p '(version 1) (allow default) (deny file-write*) (allow file-write* <filter>)' some-command
proc portsandbox::set_profile {target} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global os.major portsandbox_profile workpath distpath prefix \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global os.major portsandbox_profile workpath distpath \
</span> package.destpath configure.ccache ccache_dir
switch $target {
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/port1.0/portutil.tcl b/src/port1.0/portutil.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 2c6fefe..f450945 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/port1.0/portutil.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/port1.0/portutil.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -38,8 +38,6 @@ package require macports_util 1.0
</span> package require msgcat
package require porttrace 1.0
<span style='display:block; white-space:pre;background:#ffe0e0;'>-global targets target_uniqid all_variants
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> set targets [list]
set target_uniqid 0
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -88,7 +86,7 @@ proc exists {option} {
</span> # @param option name of the option
# @param args arguments
proc handle_option {option args} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global $option user_options option_procs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global $option user_options
</span>
if {![info exists user_options($option)]} {
set $option $args
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -101,7 +99,7 @@ proc handle_option {option args} {
</span> # @param option name of the option
# @param args arguments
proc handle_option-append {option args} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global $option user_options option_procs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global $option user_options
</span>
if {![info exists user_options($option)]} {
if {[info exists $option]} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -118,7 +116,7 @@ proc handle_option-append {option args} {
</span> # @param option name of the option
# @param args arguments
proc handle_option-prepend {option args} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global $option user_options option_procs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global $option user_options
</span>
if {![info exists user_options($option)]} {
if {[info exists $option]} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -135,7 +133,7 @@ proc handle_option-prepend {option args} {
</span> # @param option name of the option
# @param args arguments
proc handle_option-delete {option args} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global $option user_options option_procs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global $option user_options
</span>
if {![info exists user_options($option)] && [info exists $option]} {
set temp [set $option]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -152,7 +150,7 @@ proc handle_option-delete {option args} {
</span> # @param option name of the option
# @param args arguments
proc handle_option-strsed {option args} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global $option user_options option_procs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global $option user_options
</span>
if {![info exists user_options($option)] && [info exists $option]} {
set temp [set $option]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -169,7 +167,7 @@ proc handle_option-strsed {option args} {
</span> # @param option name of the option
# @param args arguments
proc handle_option-replace {option args} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global $option user_options option_procs deprecated_options
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global $option user_options deprecated_options
</span>
# Deprecate -replace with only one argument, for backwards compatibility call -strsed
# XXX: Remove this in 2.2.0
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -406,7 +404,7 @@ proc command_exec {command args} {
</span> file mkdir ${dir}
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global ${varprefix}.env ${varprefix}.env_array ${varprefix}.nice env macosx_version
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global ${varprefix}.env_array ${varprefix}.nice env
</span>
# Set the environment.
# If the array doesn't exist, we create it with the value
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -907,7 +905,7 @@ proc ldelete {list value} {
</span> # reinplace
# Provides "sed in place" functionality
proc reinplace {args} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global env workpath worksrcpath macosx_version
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global env workpath worksrcpath
</span> set extended 0
set suppress 0
# once a macports version has been released, add the rest of the
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1306,12 +1304,11 @@ proc lipo {} {
</span> }
########### Internal Dependency Manipulation Procedures ###########
<span style='display:block; white-space:pre;background:#ffe0e0;'>-global ports_dry_last_skipped
</span> set ports_dry_last_skipped ""
proc target_run {ditem} {
global target_state_fd workpath portpath ports_trace PortInfo ports_dryrun \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ports_dry_last_skipped worksrcpath prefix subport env portdbpath \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ports_dry_last_skipped worksrcpath subport env portdbpath \
</span> macosx_version
set portname $subport
set result 0
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1598,7 +1595,7 @@ proc recursive_collect_deps {portname {depsfound {}}} \
</span>
proc eval_targets {target} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global targets target_state_fd subport version revision portvariants epoch ports_dryrun user_options
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global targets subport version revision portvariants
</span> set dlist $targets
# the statefile will likely be autocleaned away after install,
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1665,7 +1662,7 @@ proc eval_targets {target} {
</span> # open file to store name of completed targets
proc open_statefile {args} {
global workpath worksymlink place_worksymlink subport portpath ports_ignore_different ports_dryrun \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- env applications_dir subbuildpath
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ subbuildpath
</span>
if {![tbool ports_dryrun]} {
set need_chown 0
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1968,7 +1965,7 @@ proc canonicalize_variants {variants {sign "+"}} {
</span> }
proc eval_variants {variations} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global all_variants ports_force PortInfo requested_variations portvariants negated_variants
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global all_variants PortInfo requested_variations portvariants negated_variants
</span> set dlist $all_variants
upvar $variations upvariations
set chosen [choose_variants $dlist upvariations]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2126,7 +2123,6 @@ proc target_new {name procedure} {
</span> }
proc target_provides {ditem args} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global targets
</span> # Register the pre-/post- hooks for use in Portfile.
# Portfile syntax: pre-fetch { puts "hello world" }
# User-code exceptions are caught and returned as a result of the target.
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2543,7 +2539,7 @@ proc PortGroup {group version} {
</span>
# return filename of the archive for this port
proc get_portimage_name {} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global portdbpath subport version revision portvariants os.platform os.major portarchivetype
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global subport version revision portvariants os.platform os.major portarchivetype
</span> set ret "${subport}-${version}_${revision}${portvariants}.${os.platform}_${os.major}.[join [get_canonical_archs] -].${portarchivetype}"
# should really look up NAME_MAX here, but it's 255 for all OS X so far
# (leave 10 chars for an extension like .rmd160 on the sig file)
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2602,7 +2598,6 @@ proc find_portarchive_path {} {
</span> # check if archive type is supported by current system
# returns an error code if it is not
proc archiveTypeIsSupported {type} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global os.platform os.version
</span> set errmsg ""
switch -regex $type {
cp(io|gz) {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2936,7 +2931,7 @@ proc fileAttrsAsRoot {file attributes} {
</span> #
# @param action the action for which privileges are being elevated
proc elevateToRoot {action} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global euid egid macportsuser
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global euid egid
</span>
if { [getuid] == 0 && [geteuid] != 0 } {
# if started with sudo but have dropped the privileges
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2952,7 +2947,8 @@ proc elevateToRoot {action} {
</span> # de-escalate privileges from root to those of $macportsuser.
#
proc dropPrivileges {} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global euid egid macportsuser workpath
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global macportsuser
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # workpath
</span> if { [geteuid] == 0 } {
if { [catch {
if {[name_to_uid "$macportsuser"] != 0} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3031,7 +3027,7 @@ proc _libtest {depspec {return_match 0}} {
</span> ### _bintest is private; subject to change without notice
proc _bintest {depspec {return_match 0}} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global env prefix
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global env
</span> set depregex [lindex [split $depspec :] 1]
set search_path [split $env(PATH) :]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3044,7 +3040,7 @@ proc _bintest {depspec {return_match 0}} {
</span> ### _pathtest is private; subject to change without notice
proc _pathtest {depspec {return_match 0}} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global env prefix
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global prefix
</span> set depregex [lindex [split $depspec :] 1]
# separate directory from regex
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/registry2.0/portimage.tcl b/src/registry2.0/portimage.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 5fe4641..b576719 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/registry2.0/portimage.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/registry2.0/portimage.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -77,7 +77,7 @@ proc activate_composite {name {v ""} {optionslist ""}} {
</span>
# Activate a "Port Image"
proc activate {name {version ""} {revision ""} {variants 0} {optionslist ""}} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::prefix macports::registry.path registry_open UI_PREFIX
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global macports::registry.path registry_open UI_PREFIX
</span> array set options $optionslist
variable force
variable noexec
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -310,7 +310,6 @@ proc _activate_file {srcfile dstfile} {
</span> # extract an archive to a temporary location
# returns: path to the extracted directory
proc extract_archive_to_tmpdir {location} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::registry.path
</span> set extractdir [mkdtemp [::file dirname $location]/mpextractXXXXXXXX]
set startpwd [pwd]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -453,7 +452,6 @@ proc extract_archive_to_tmpdir {location} {
</span> proc _activate_contents {port {imagefiles {}} {location {}}} {
variable force
variable noexec
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::prefix
</span>
set files [list]
set baksuffix .mp_[clock seconds]
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/registry2.0/portuninstall.tcl b/src/registry2.0/portuninstall.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index ff45cfb..67ee49d 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/registry2.0/portuninstall.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/registry2.0/portuninstall.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -109,8 +109,7 @@ proc uninstall_composite {portname {v ""} {optionslist ""}} {
</span> }
proc uninstall {portname {version ""} {revision ""} {variants 0} {optionslist ""}} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global uninstall.force uninstall.nochecksum UI_PREFIX \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- macports::portimagefilepath macports::registry.path
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global uninstall.force UI_PREFIX macports::registry.path
</span> array set options $optionslist
if {[info exists options(subport)]} {
# don't want this set when calling registry::run_target
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/registry2.0/registry.tcl b/src/registry2.0/registry.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 6f1b5d9..6da2448 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/registry2.0/registry.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/registry2.0/registry.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -46,9 +46,8 @@ namespace eval registry {
</span> # Begin creating a new registry entry for the port version_revision+variant
# This process assembles the directory name and creates a receipt dlist
proc new_entry {name version {revision 0} {variants ""} {epoch 0} } {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::registry.path macports::registry.format macports::prefix
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global macports::registry.format
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> # Make sure we don't already have an entry in the Registry for this
# port version_revision+variants
if {![entry_exists $name $version $revision $variants] } {
</pre><pre style='margin:0'>
</pre>