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

and.damore at macports.org and.damore at macports.org
Tue Jan 24 05:49:08 PST 2012


Revision: 89306
          http://trac.macports.org/changeset/89306
Author:   and.damore at macports.org
Date:     2012-01-24 05:49:05 -0800 (Tue, 24 Jan 2012)
Log Message:
-----------
port.tcl: adding check before printing $portinfo(category) in action_search when --line is specified
This resulted in an error when action_search parsed ports without category like the ones using replace_by.
For an example try "port search --line mail" before this commit, execution breaks at port p5-mail-spf-query.

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

Modified: trunk/base/src/port/port.tcl
===================================================================
--- trunk/base/src/port/port.tcl	2012-01-24 12:05:28 UTC (rev 89305)
+++ trunk/base/src/port/port.tcl	2012-01-24 13:49:05 UTC (rev 89306)
@@ -3547,7 +3547,13 @@
             } else {
                 if {[info exists options(ports_search_line)]
                         && $options(ports_search_line) == "yes"} {
-                    puts "$portinfo(name)\t$portinfo(version)\t$portinfo(categories)\t$portinfo(description)"
+                    # check for ports without category, e.g. replaced_by stubs
+                    if {[info exists portinfo(categories)]} {
+                        puts "$portinfo(name)\t$portinfo(version)\t$portinfo(categories)\t$portinfo(description)"
+                    } else {
+                        # keep two consecutive tabs in order to provide consistent columns' content
+                        puts "$portinfo(name)\t$portinfo(version)\t\t$portinfo(description)"
+                    }
                 } else {
                     puts -nonewline $joiner
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120124/963415d0/attachment.html>


More information about the macports-changes mailing list