[68683] trunk/base/src/macports1.0/macports.tcl
jmr at macports.org
jmr at macports.org
Thu Jun 10 00:28:26 PDT 2010
Revision: 68683
http://trac.macports.org/changeset/68683
Author: jmr at macports.org
Date: 2010-06-10 00:28:20 -0700 (Thu, 10 Jun 2010)
Log Message:
-----------
slightly more efficient env cleanup
Modified Paths:
--------------
trunk/base/src/macports1.0/macports.tcl
Modified: trunk/base/src/macports1.0/macports.tcl
===================================================================
--- trunk/base/src/macports1.0/macports.tcl 2010-06-10 07:01:42 UTC (rev 68682)
+++ trunk/base/src/macports1.0/macports.tcl 2010-06-10 07:28:20 UTC (rev 68683)
@@ -834,9 +834,10 @@
set keepenvkeys [concat ${keepenvkeys} ${extra_env}]
}
- foreach envkey [array names env] {
- if {[lsearch $keepenvkeys $envkey] == -1} {
- array unset env $envkey
+ set env_names [array names env]
+ foreach envkey $env_names {
+ if {[lsearch -exact $keepenvkeys $envkey] == -1} {
+ unset env($envkey)
}
}
@@ -870,8 +871,8 @@
}
# unset environment an extra time, to work around bugs in Leopard Tcl
- foreach envkey [array names env] {
- if {[lsearch $keepenvkeys $envkey] == -1} {
+ foreach envkey $env_names {
+ if {[lsearch -exact $keepenvkeys $envkey] == -1} {
unsetenv $envkey
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100610/759b1fd9/attachment.html>
More information about the macports-changes
mailing list