[100679] trunk/base/src

jmr at macports.org jmr at macports.org
Wed Dec 19 19:05:48 PST 2012


Revision: 100679
          https://trac.macports.org/changeset/100679
Author:   jmr at macports.org
Date:     2012-12-19 19:05:48 -0800 (Wed, 19 Dec 2012)
Log Message:
-----------
save the original set of requested variations separately for mpkg's use, since eval_variants filters out variations for which the port doesn't have a corresponding variant (#36363)

Modified Paths:
--------------
    trunk/base/src/package1.0/portmpkg.tcl
    trunk/base/src/port1.0/portutil.tcl

Modified: trunk/base/src/package1.0/portmpkg.tcl
===================================================================
--- trunk/base/src/package1.0/portmpkg.tcl	2012-12-20 02:24:49 UTC (rev 100678)
+++ trunk/base/src/package1.0/portmpkg.tcl	2012-12-20 03:05:48 UTC (rev 100679)
@@ -59,7 +59,7 @@
 }
 
 proc portmpkg::make_dependency_list {portname destination} {
-    global variations prefix package.destpath package.flat
+    global requested_variations prefix package.destpath package.flat
     set result {}
     if {[catch {set res [mport_lookup $portname]} error]} {
         global errorInfo
@@ -73,7 +73,7 @@
         set deprivileged 1
     }
 
-    set mport [mport_open $portinfo(porturl) [list prefix $prefix package.destpath ${destination} package.flat ${package.flat} subport $portinfo(name)] [array get variations]]
+    set mport [mport_open $portinfo(porturl) [list prefix $prefix package.destpath ${destination} package.flat ${package.flat} subport $portinfo(name)] [array get requested_variations]]
 
     if {[info exists deprivileged]} {
         global macportsuser

Modified: trunk/base/src/port1.0/portutil.tcl
===================================================================
--- trunk/base/src/port1.0/portutil.tcl	2012-12-20 02:24:49 UTC (rev 100678)
+++ trunk/base/src/port1.0/portutil.tcl	2012-12-20 03:05:48 UTC (rev 100679)
@@ -1939,7 +1939,7 @@
 }
 
 proc eval_variants {variations} {
-    global all_variants ports_force PortInfo portvariants negated_variants
+    global all_variants ports_force PortInfo requested_variations portvariants negated_variants
     set dlist $all_variants
     upvar $variations upvariations
     set chosen [choose_variants $dlist upvariations]
@@ -1950,6 +1950,8 @@
     # Check to make sure the requested variations are available with this
     # port, if one is not, warn the user and remove the variant from the
     # array.
+    # Save the originally requested set in requested_variations.
+    array set requested_variations [array get upvariations]
     foreach key [array names upvariations *] {
         if {![info exists PortInfo(variants)] ||
             [lsearch $PortInfo(variants) $key] == -1} {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20121219/06dcb917/attachment.html>


More information about the macports-changes mailing list