[140015] trunk/base/src/macports1.0/macports.tcl

cal at macports.org cal at macports.org
Sun Sep 6 09:33:57 PDT 2015


Revision: 140015
          https://trac.macports.org/changeset/140015
Author:   cal at macports.org
Date:     2015-09-06 09:33:56 -0700 (Sun, 06 Sep 2015)
Log Message:
-----------
base: Fix _mportkey with non-trivial variable names such as "test.run"

Additionally drop the return statement that's not really necessary, because the
return value of the eval'd script will automatically be returned to the parent
interpreter even without it. Use Tcl's [list] to ensure $key is correctly
quoted no matter what it is.

Modified Paths:
--------------
    trunk/base/src/macports1.0/macports.tcl

Modified: trunk/base/src/macports1.0/macports.tcl
===================================================================
--- trunk/base/src/macports1.0/macports.tcl	2015-09-06 14:08:34 UTC (rev 140014)
+++ trunk/base/src/macports1.0/macports.tcl	2015-09-06 16:33:56 UTC (rev 140015)
@@ -3099,7 +3099,7 @@
 
 proc _mportkey {mport key} {
     set workername [ditem_key $mport workername]
-    return [$workername eval "return \$$key"]
+    return [$workername eval [list set $key]]
 }
 
 # mportdepends builds the list of mports which the given port depends on.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150906/a24d9788/attachment.html>


More information about the macports-changes mailing list