Ignore:
Timestamp:
Oct 29, 2002, 8:42:59 PM (16 years ago)
Author:
kevin
Message:

Ignore variant mismatch if ports_force is specified.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/port1.0/portutil.tcl

    r1169 r1176  
    768768
    769769proc eval_variants {variations target} {
    770     global all_variants
     770    global all_variants ports_force
    771771    set dlist $all_variants
    772772        set result 0
     
    789789        # Make sure the variations match those stored in the statefile.
    790790        # If they don't match, print an error indicating a 'port clean'
    791         # should be performed.  Skip this test if the statefile is empty.
    792         # Also skip this test if performing a clean so we don't shoot
    793         # ourselves in the foot.
    794 
    795         if {$target != "clean"} {
     791        # should be performed. 
     792        # - Skip this test if the statefile is empty.
     793        # - Skip this test if performing a clean.
     794        # - Skip this test if ports_force was specified.
     795
     796        if {$target != "clean" &&
     797                !([info exists ports_force] && $ports_force == "yes")} {
    796798                set state_fd [open_statefile]
    797799       
    798800                if {[check_statefile_variants upvariations $state_fd]} {
    799                         ui_error "Requested variants do not match original selection.\nPlease perform 'port clean'."
     801                        ui_error "Requested variants do not match original selection.\nPlease perform 'port clean' or specify the force option."
    800802                        set result 1
    801803                } else {
Note: See TracChangeset for help on using the changeset viewer.