[25071] branches/dp2mp-move/base/src
source_changes at macosforge.org
source_changes at macosforge.org
Sun May 13 00:09:23 PDT 2007
Revision: 25071
http://trac.macosforge.org/projects/macports/changeset/25071
Author: jmpp at macports.org
Date: 2007-05-13 00:09:22 -0700 (Sun, 13 May 2007)
Log Message:
-----------
Merge Eridius' r25033: Evaluate variants during mportopen instead of mportexec.
Modified Paths:
--------------
branches/dp2mp-move/base/src/macports1.0/macports.tcl
branches/dp2mp-move/base/src/port1.0/portutil.tcl
Modified: branches/dp2mp-move/base/src/macports1.0/macports.tcl
===================================================================
--- branches/dp2mp-move/base/src/macports1.0/macports.tcl 2007-05-13 06:46:45 UTC (rev 25070)
+++ branches/dp2mp-move/base/src/macports1.0/macports.tcl 2007-05-13 07:09:22 UTC (rev 25071)
@@ -822,6 +822,12 @@
$workername eval source Portfile
+ # evaluate the variants
+ if {[$workername eval eval_variants variations] != 0} {
+ mportclose $mport
+ error "Error evaluating variants"
+ }
+
ditem_key $mport provides [$workername eval return \$portname]
return $mport
@@ -1042,7 +1048,7 @@
proc _mportexec {target mport} {
# xxx: set the work path?
set workername [ditem_key $mport workername]
- if {![catch {$workername eval eval_variants variations $target} result] && $result == 0 &&
+ if {![catch {$workername eval check_variants variations $target} result] && $result == 0 &&
![catch {$workername eval eval_targets $target} result] && $result == 0} {
# If auto-clean mode, clean-up after dependency install
if {[string equal ${macports::portautoclean} "yes"]} {
@@ -1070,8 +1076,8 @@
set workername [ditem_key $mport workername]
- # XXX: move this into mportopen?
- if {[$workername eval eval_variants variations $target] != 0} {
+ # check variants
+ if {[$workername eval check_variants variations $target] != 0} {
return 1
}
Modified: branches/dp2mp-move/base/src/port1.0/portutil.tcl
===================================================================
--- branches/dp2mp-move/base/src/port1.0/portutil.tcl 2007-05-13 06:46:45 UTC (rev 25070)
+++ branches/dp2mp-move/base/src/port1.0/portutil.tcl 2007-05-13 07:09:22 UTC (rev 25071)
@@ -1365,10 +1365,9 @@
return 0
}
-proc eval_variants {variations target} {
+proc eval_variants {variations} {
global all_variants ports_force PortInfo
set dlist $all_variants
- set result 0
upvar $variations upvariations
set chosen [choose_variants $dlist upvariations]
set portname $PortInfo(name)
@@ -1400,6 +1399,15 @@
return 1
}
+ return 0
+}
+
+proc check_variants {variations target} {
+ global ports_force PortInfo
+ upvar $variations upvariations
+ set result 0
+ set portname $PortInfo(name)
+
# Make sure the variations match those stored in the statefile.
# If they don't match, print an error indicating a 'port clean'
# should be performed.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070513/b1160f84/attachment.html
More information about the macports-changes
mailing list