[24855] trunk/base/src/port1.0/portutil.tcl

source_changes at macosforge.org source_changes at macosforge.org
Sun May 6 08:46:11 PDT 2007


Revision: 24855
          http://trac.macosforge.org/projects/macports/changeset/24855
Author:   jberry at macports.org
Date:     2007-05-06 08:46:11 -0700 (Sun, 06 May 2007)

Log Message:
-----------
Ignore variant mismatch for not just clean target, but also submit target

Modified Paths:
--------------
    trunk/base/src/port1.0/portutil.tcl

Modified: trunk/base/src/port1.0/portutil.tcl
===================================================================
--- trunk/base/src/port1.0/portutil.tcl	2007-05-06 15:45:15 UTC (rev 24854)
+++ trunk/base/src/port1.0/portutil.tcl	2007-05-06 15:46:11 UTC (rev 24855)
@@ -1406,24 +1406,25 @@
     # If they don't match, print an error indicating a 'port clean' 
     # should be performed.  
     # - Skip this test if the statefile is empty.
-    # - Skip this test if performing a clean.
+    # - Skip this test if performing a clean or submit.
     # - Skip this test if ports_force was specified.
     
-    if {$target != "clean" && 
-	!([info exists ports_force] && $ports_force == "yes")} {
-	set state_fd [open_statefile]
+    if { [lsearch "clean submit" $target] < 0 && 
+		!([info exists ports_force] && $ports_force == "yes")} {
+		
+		set state_fd [open_statefile]
 	
-	if {[check_statefile_variants upvariations $state_fd]} {
-	    ui_error "Requested variants do not match original selection.\nPlease perform 'port clean $portname' or specify the force option."
-	    set result 1
-	} else {
-	    # Write variations out to the statefile
-	    foreach key [array names upvariations *] {
-		write_statefile variant $upvariations($key)$key $state_fd
-	    }
-	}
-	
-	close $state_fd
+		if {[check_statefile_variants upvariations $state_fd]} {
+			ui_error "Requested variants do not match original selection.\nPlease perform 'port clean $portname' or specify the force option."
+			set result 1
+		} else {
+			# Write variations out to the statefile
+			foreach key [array names upvariations *] {
+			write_statefile variant $upvariations($key)$key $state_fd
+			}
+		}
+		
+		close $state_fd
     }
     
     return $result

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070506/e76f520e/attachment.html


More information about the macports-changes mailing list