[89306] trunk/base/src/port/port.tcl
Ryan Schmidt
ryandesign at macports.org
Tue Jan 24 09:23:08 PST 2012
On Jan 24, 2012, at 07:49, and.damore at macports.org wrote:
> 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)"
> + }
Even ports that have been replaced should list a category; category is a required variable.
$ port lint p5-mail-spf-query
---> Verifying Portfile for p5-mail-spf-query
Error: Missing required variable: categories
---> 1 errors and 0 warnings found.
More information about the macports-dev
mailing list