[54425] trunk/base/src/macports1.0/macports.tcl
jmr at macports.org
jmr at macports.org
Mon Jul 27 06:39:12 PDT 2009
Revision: 54425
http://trac.macports.org/changeset/54425
Author: jmr at macports.org
Date: 2009-07-27 06:39:11 -0700 (Mon, 27 Jul 2009)
Log Message:
-----------
upgrade: don't bother checking whether variants are provided by the port, which also allows things to happen in a slightly more sensible order
Modified Paths:
--------------
trunk/base/src/macports1.0/macports.tcl
Modified: trunk/base/src/macports1.0/macports.tcl
===================================================================
--- trunk/base/src/macports1.0/macports.tcl 2009-07-27 13:29:48 UTC (rev 54424)
+++ trunk/base/src/macports1.0/macports.tcl 2009-07-27 13:39:11 UTC (rev 54425)
@@ -2424,6 +2424,24 @@
# remove implicit variants, without printing warnings
set oldvariantlist [mport_filtervariants $oldvariantlist no]
+ # merge in the old variants
+ foreach {variation value} $oldvariantlist {
+ if { ![info exists variations($variation)]} {
+ set variations($variation) $value
+ }
+ }
+
+ # Now merge in the global (i.e. variants.conf) variations.
+ # We wait until now so that existing variants for this port
+ # override global variations
+ foreach { variation value } $globalvarlist {
+ if { ![info exists variations($variation)] } {
+ set variations($variation) $value
+ }
+ }
+
+ ui_debug "new fully merged portvariants: [array get variations]"
+
# at this point we need to check if a different port will be replacing this one
if {[info exists portinfo(replaced_by)] && ![info exists options(ports_upgrade_no-replace)]} {
ui_debug "$portname is replaced by $portinfo(replaced_by)"
@@ -2440,7 +2458,6 @@
array unset portinfo
array set portinfo [lindex $result 1]
set newname $portinfo(name)
- set version_in_tree "$portinfo(version)"
set porturl $portinfo(porturl)
if {![info exists porturl]} {
@@ -2451,33 +2468,6 @@
set newname $portname
}
- # check if the variants are present in $version_in_tree
- if {[info exists portinfo(variants)]} {
- set avariants $portinfo(variants)
- } else {
- set avariants {}
- }
- ui_debug "available variants are : $avariants"
- foreach {variation value} $oldvariantlist {
- if {[lsearch $avariants $variation] != -1} {
- ui_debug "variant $variation is present in $newname $version_in_tree"
- if { ![info exists variations($variation)]} {
- set variations($variation) $value
- }
- }
- }
-
- # Now merge in the global (i.e. variants.conf) variations.
- # We wait until now so that existing variants for this port
- # override global variations
- foreach { variation value } $globalvarlist {
- if { ![info exists variations($variation)] } {
- set variations($variation) $value
- }
- }
-
- ui_debug "new fully merged portvariants: [array get variations]"
-
if {[catch {set workername [mportopen $porturl [array get options] [array get variations]]} result]} {
global errorInfo
ui_debug "$errorInfo"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090727/362648f9/attachment.html>
More information about the macports-changes
mailing list