[68691] trunk/base/src
jmr at macports.org
jmr at macports.org
Thu Jun 10 05:42:19 PDT 2010
Revision: 68691
http://trac.macports.org/changeset/68691
Author: jmr at macports.org
Date: 2010-06-10 05:42:15 -0700 (Thu, 10 Jun 2010)
Log Message:
-----------
restrict use of unsetenv to 10.5
Modified Paths:
--------------
trunk/base/src/macports1.0/macports.tcl
trunk/base/src/port/port.tcl
trunk/base/src/port1.0/porttrace.tcl
trunk/base/src/port1.0/portutil.tcl
Modified: trunk/base/src/macports1.0/macports.tcl
===================================================================
--- trunk/base/src/macports1.0/macports.tcl 2010-06-10 12:07:34 UTC (rev 68690)
+++ trunk/base/src/macports1.0/macports.tcl 2010-06-10 12:42:15 UTC (rev 68691)
@@ -871,9 +871,11 @@
}
# unset environment an extra time, to work around bugs in Leopard Tcl
- foreach envkey $env_names {
- if {[lsearch -exact $keepenvkeys $envkey] == -1} {
- unsetenv $envkey
+ if {$macosx_version == "10.5"} {
+ foreach envkey $env_names {
+ if {[lsearch -exact $keepenvkeys $envkey] == -1} {
+ unsetenv $envkey
+ }
}
}
Modified: trunk/base/src/port/port.tcl
===================================================================
--- trunk/base/src/port/port.tcl 2010-06-10 12:07:34 UTC (rev 68690)
+++ trunk/base/src/port/port.tcl 2010-06-10 12:42:15 UTC (rev 68691)
@@ -3452,7 +3452,11 @@
# We need it to evaluate the editor, and the editor
# may want stuff from it as well, like TERM.
array unset env_save; array set env_save [array get env]
- array unset env *; unsetenv *; array set env [array get boot_env]
+ array unset env *
+ if {${macports::macosx_version} == "10.5"} {
+ unsetenv *
+ }
+ array set env [array get boot_env]
# Find an editor to edit the portfile
set editor ""
@@ -3478,7 +3482,11 @@
}
# Restore internal MacPorts environment
- array unset env *; unsetenv *; array set env [array get env_save]
+ array unset env *
+ if {${macports::macosx_version} == "10.5"} {
+ unsetenv *
+ }
+ array set env [array get env_save]
}
dir {
Modified: trunk/base/src/port1.0/porttrace.tcl
===================================================================
--- trunk/base/src/port1.0/porttrace.tcl 2010-06-10 12:07:34 UTC (rev 68690)
+++ trunk/base/src/port1.0/porttrace.tcl 2010-06-10 12:42:15 UTC (rev 68691)
@@ -101,10 +101,12 @@
# Disable the fence.
# Unused yet.
proc porttrace::trace_disable_fence {} {
- global env
+ global env macosx_version
if [info exists env(DARWINTRACE_SANDBOX_BOUNDS)] {
unset env(DARWINTRACE_SANDBOX_BOUNDS)
- unsetenv DARWINTRACE_SANDBOX_BOUNDS
+ if {$macosx_version == "10.5"} {
+ unsetenv DARWINTRACE_SANDBOX_BOUNDS
+ }
}
}
@@ -147,10 +149,12 @@
proc porttrace::trace_stop {} {
global os.platform
if {${os.platform} == "darwin"} {
- global env trace_fifo
+ global env trace_fifo macosx_version
foreach var {DYLD_INSERT_LIBRARIES DYLD_FORCE_FLAT_NAMESPACE DARWINTRACE_LOG DARWINTRACE_SANDBOX_BOUNDS} {
array unset env $var
- unsetenv $var
+ if {$macosx_version == "10.5"} {
+ unsetenv $var
+ }
}
#kill socket
Modified: trunk/base/src/port1.0/portutil.tcl
===================================================================
--- trunk/base/src/port1.0/portutil.tcl 2010-06-10 12:07:34 UTC (rev 68690)
+++ trunk/base/src/port1.0/portutil.tcl 2010-06-10 12:42:15 UTC (rev 68691)
@@ -328,7 +328,7 @@
# command_prefix additional command prefix (typically pipe command)
# command_suffix additional command suffix (typically redirection)
proc command_exec {command args} {
- global ${command}.env ${command}.env_array ${command}.nice env
+ global ${command}.env ${command}.env_array ${command}.nice env macosx_version
set notty ""
set command_prefix ""
set command_suffix ""
@@ -394,7 +394,9 @@
# Restore the environment.
array unset env *
- unsetenv *
+ if {$macosx_version == "10.5"} {
+ unsetenv *
+ }
array set env [array get saved_env]
# Return as if system had been called directly.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100610/30b71ac3/attachment-0001.html>
More information about the macports-changes
mailing list