[31358] trunk/base/src/port/port.tcl

jmpp at macports.org jmpp at macports.org
Tue Nov 20 21:54:25 PST 2007


Revision: 31358
          http://trac.macosforge.org/projects/macports/changeset/31358
Author:   jmpp at macports.org
Date:     2007-11-20 21:54:23 -0800 (Tue, 20 Nov 2007)

Log Message:
-----------

Bail out immediately from the action_variants proc if no match for the requested port was found,
rather than foolishly trying to continue and causing a runtime error due to an unexistent array,
thus avoiding the resulting ugly backtrace spewage to unsuspecting users.

Fixes #13284

Modified Paths:
--------------
    trunk/base/src/port/port.tcl

Modified: trunk/base/src/port/port.tcl
===================================================================
--- trunk/base/src/port/port.tcl	2007-11-21 03:51:19 UTC (rev 31357)
+++ trunk/base/src/port/port.tcl	2007-11-21 05:54:23 UTC (rev 31358)
@@ -1698,9 +1698,8 @@
             ui_debug "$errorInfo"
             break_softcontinue "search for portname $portname failed: $result" 1 status
         }
-    
-        if {$result == ""} {
-            puts "No port $portname found."
+        if {[llength $result] < 2} {
+            break_softcontinue "Port $portname not found" 1 status
         }
     
         array unset portinfo

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


More information about the macports-changes mailing list