[90517] trunk/dports/_resources/port1.0/group/python-1.0.tcl

dports at macports.org dports at macports.org
Wed Mar 7 20:31:40 PST 2012


Revision: 90517
          http://trac.macports.org/changeset/90517
Author:   dports at macports.org
Date:     2012-03-07 20:31:40 -0800 (Wed, 07 Mar 2012)
Log Message:
-----------
python portgroup: make sure we've set replaced_by before trying to
unset it in python_set_default_version. See
http://lists.macosforge.org/pipermail/macports-dev/2012-March/018087.html

Modified Paths:
--------------
    trunk/dports/_resources/port1.0/group/python-1.0.tcl

Modified: trunk/dports/_resources/port1.0/group/python-1.0.tcl
===================================================================
--- trunk/dports/_resources/port1.0/group/python-1.0.tcl	2012-03-08 04:20:50 UTC (rev 90516)
+++ trunk/dports/_resources/port1.0/group/python-1.0.tcl	2012-03-08 04:31:40 UTC (rev 90517)
@@ -148,11 +148,15 @@
     global name subport python.default_version
     if {[string match py-* $name]} {
         if {$subport == $name || $subport == ""} {
-            if {${python.default_version} == "24"} {
-                replaced_by py24[string trimleft $name py]
-            } else {
+            # Mark stub as replaced_by py24 subport if that's the
+            # default version, for backwards compatibility.  If the
+            # default version isn't 24, clear replaced_by -- it might
+            # have already been set by python_set_versions. (But make
+            # sure we've set it first, or unset might complain.)
+            replaced_by py24[string trimleft $name py]
+            if {${python.default_version} != "24"} {
                 global replaced_by
-                unset -nocomplain replaced_by
+                unset replaced_by
             }
             depends_lib port:py${python.default_version}[string trimleft $name py]
         }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120307/6b39a417/attachment.html>


More information about the macports-changes mailing list