Projects
New Ticket     Wiki     Browse Source     Timeline     Roadmap     Bug Reports     Search

Changeset 25033

Show
Ignore:
Timestamp:
2007-05-11 23:17:27 (19 months ago)
Author:
eridius@…
Message:

Evaluate variants during dportopen instead of dportexec.
This ensures that querying an open port always contains the proper variant-modified information before any targets are executed.
It also prevents variants from being executed multiple times if multiple targets are executed separately (fixes #11296).

Location:
trunk/base
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/base/ChangeLog

    r25025 r25033  
    66 
    77(unreleased): 
     8 
     9    - Evaluate variants at dportopen instead of dportexec. This ensures that 
     10      the portfile represents the proper information if queried before targets 
     11      are executed. It also prevents variants from being executed twice if multiple 
     12      targets are executed separately on the portfile (ticket #11296, eridius r25033). 
    813 
    914    - Fix copy and move commands (eridius r25024). 
  • trunk/base/src/darwinports1.0/darwinports.tcl

    r24879 r25033  
    814814 
    815815    $workername eval source Portfile 
     816     
     817    # evaluate the variants 
     818        if {[$workername eval eval_variants variations] != 0} { 
     819            dportclose $dport 
     820                error "Error evaluating variants" 
     821        } 
    816822 
    817823    ditem_key $dport provides [$workername eval return \$portname] 
     
    10351041        # xxx: set the work path? 
    10361042        set workername [ditem_key $dport workername] 
    1037         if {![catch {$workername eval eval_variants variations $target} result] && $result == 0 && 
     1043        if {![catch {$workername eval check_variants variations $target} result] && $result == 0 && 
    10381044                ![catch {$workername eval eval_targets $target} result] && $result == 0} { 
    10391045                # If auto-clean mode, clean-up after dependency install 
     
    10621068 
    10631069        set workername [ditem_key $dport workername] 
    1064  
    1065         # XXX: move this into dportopen? 
    1066         if {[$workername eval eval_variants variations $target] != 0} { 
     1070         
     1071        # check variants 
     1072        if {[$workername eval check_variants variations $target] != 0} { 
    10671073                return 1 
    10681074        } 
  • trunk/base/src/port1.0/portutil.tcl

    r25032 r25033  
    13661366} 
    13671367 
    1368 proc eval_variants {variations target} { 
     1368proc eval_variants {variations} { 
    13691369    global all_variants ports_force PortInfo 
    13701370    set dlist $all_variants 
    1371     set result 0 
    13721371    upvar $variations upvariations 
    13731372    set chosen [choose_variants $dlist upvariations] 
     
    14001399                return 1 
    14011400    } 
     1401     
     1402    return 0 
     1403} 
     1404 
     1405proc check_variants {variations target} { 
     1406    global ports_force PortInfo 
     1407    upvar $variations upvariations 
     1408    set result 0 
     1409    set portname $PortInfo(name) 
    14021410     
    14031411    # Make sure the variations match those stored in the statefile.