[66898] trunk/base/src/macports1.0/macports.tcl
jmr at macports.org
jmr at macports.org
Sat Apr 24 17:27:39 PDT 2010
Revision: 66898
http://trac.macports.org/changeset/66898
Author: jmr at macports.org
Date: 2010-04-24 17:27:33 -0700 (Sat, 24 Apr 2010)
Log Message:
-----------
take variations from parent when installing new ports in upgrade, also minor rearrangement/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-04-24 22:47:54 UTC (rev 66897)
+++ trunk/base/src/macports1.0/macports.tcl 2010-04-25 00:27:33 UTC (rev 66898)
@@ -2743,14 +2743,6 @@
global macports::global_variations
array set options $optionslist
- # Note $variationslist is left alone and so retains the original
- # requested variations, which should be passed to recursive calls to
- # upgrade; while variations gets existing variants and global variations
- # merged in later on, so it applies only to this port's upgrade
- array set variations $variationslist
-
- set globalvarlist [array get macports::global_variations]
-
if {![string match "" $depscachename]} {
upvar $depscachename depscache
}
@@ -2778,15 +2770,6 @@
# set portname again since the one we were passed may not have had the correct case
set portname $portinfo(name)
- # set version_in_tree and revision_in_tree
- if {![info exists portinfo(version)]} {
- ui_error "Invalid port entry for $portname, missing version"
- return 1
- }
- set version_in_tree "$portinfo(version)"
- set revision_in_tree "$portinfo(revision)"
- set epoch_in_tree "$portinfo(epoch)"
-
set ilist {}
if { [catch {set ilist [registry::installed $portname ""]} result] } {
if {$result == "Registry error: $portname not registered as installed." } {
@@ -2802,12 +2785,8 @@
if {![info exists porturl]} {
set porturl file://./
}
- # Merge the global variations into the specified
- foreach { variation value } $globalvarlist {
- if { ![info exists variations($variation)] } {
- set variations($variation) $value
- }
- }
+ # Grab the variations from the parent
+ upvar 2 variations variations
if {[catch {set workername [mportopen $porturl [array get options] [array get variations]]} result]} {
global errorInfo
@@ -2858,13 +2837,19 @@
# we'll now take care of upgrading it, so we can add it to the cache
set depscache(port:${portname}) 1
}
- set anyactive no
- set version_installed {}
- set revision_installed {}
- set epoch_installed 0
- set variant_installed ""
+
+ # set version_in_tree and revision_in_tree
+ if {![info exists portinfo(version)]} {
+ ui_error "Invalid port entry for $portname, missing version"
+ return 1
+ }
+ set version_in_tree "$portinfo(version)"
+ set revision_in_tree "$portinfo(revision)"
+ set epoch_in_tree "$portinfo(epoch)"
# find latest version installed and active version (if any)
+ set anyactive no
+ set version_installed {}
foreach i $ilist {
set variant [lindex $i 3]
set version [lindex $i 1]
@@ -2874,7 +2859,7 @@
($epoch == $epoch_installed && [rpm-vercomp $version $version_installed] > 0)
|| ($epoch == $epoch_installed
&& [rpm-vercomp $version $version_installed] == 0
- && [rpm-vercomp $revision $revision_installed] > 0)} {
+ && $revision > $revision_installed)} {
set version_installed $version
set revision_installed $revision
set variant_installed $variant
@@ -2921,6 +2906,14 @@
set porturl file://./
}
+ # Note $variationslist is left alone and so retains the original
+ # requested variations, which should be passed to recursive calls to
+ # upgrade; while variations gets existing variants and global variations
+ # merged in later on, so it applies only to this port's upgrade
+ array set variations $variationslist
+
+ set globalvarlist [array get macports::global_variations]
+
set minusvariant [lrange [split $oldnegatedvariant -] 1 end]
set plusvariant [lrange [split $oldvariant +] 1 end]
ui_debug "Merging existing variants '${oldvariant}${oldnegatedvariant}' into variants"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100424/bfea269e/attachment.html>
More information about the macports-changes
mailing list