[25110] trunk/base

source_changes at macosforge.org source_changes at macosforge.org
Sun May 13 22:16:57 PDT 2007


Revision: 25110
          http://trac.macosforge.org/projects/macports/changeset/25110
Author:   boeyms at macports.org
Date:     2007-05-13 22:16:57 -0700 (Sun, 13 May 2007)

Log Message:
-----------
 * Convert description and long_description from lists to strings before
   printing to stdout; this enables the proper printing of semi-colons, brackets
   and other Tcl escape sequences, with the exception of newline and carriage
   return (these break the flatfile PortIndex format by introducing line
   breaks).
 * Update portfile(7) to document the above.

Modified Paths:
--------------
    trunk/base/doc/portfile.7
    trunk/base/src/port/port.tcl

Modified: trunk/base/doc/portfile.7
===================================================================
--- trunk/base/doc/portfile.7	2007-05-14 05:03:54 UTC (rev 25109)
+++ trunk/base/doc/portfile.7	2007-05-14 05:16:57 UTC (rev 25110)
@@ -96,7 +96,11 @@
 .Sy Example:
 .Dl epoch 20041231
 .It Ic description
-One line description of the software and what it does.
+One line description of the software and what it does.  To appear in the
+description, brackets and semi-colons need to be escaped with a backslash (i.e.
+they must be written as "\\[", "\\]" and "\\;").  The escape sequences listed in
+.Xr re_syntax n
+may also be used, with the exception of \\n, \\r and \\f.
 .br
 .Sy Type:
 .Em required
@@ -104,7 +108,11 @@
 .Sy Example:
 .Dl description Dictionary Server Protocol (RFC2229) client
 .It Ic long_description
-A verbose description of the software and what it does.
+A verbose description of the software and what it does.  To appear in the
+description, brackets and semi-colons need to be escaped with a backslash (i.e.
+they must be written as "\\[", "\\]" and "\\;").  The escape sequences listed in
+.Xr re_syntax n
+may also be used, with the exception of \\n, \\r and \\f.
 .br
 .Sy Type:
 .Em required

Modified: trunk/base/src/port/port.tcl
===================================================================
--- trunk/base/src/port/port.tcl	2007-05-14 05:03:54 UTC (rev 25109)
+++ trunk/base/src/port/port.tcl	2007-05-14 05:16:57 UTC (rev 25110)
@@ -1254,7 +1254,7 @@
 				}
 		
 				if {[info exists portinfo(long_description)]} {
-					puts "\n$portinfo(long_description)\n"
+					puts "\n[join $portinfo(long_description)]\n"
 				}
 	
 				# find build dependencies
@@ -1802,9 +1802,9 @@
 				continue
 			}
 			if {![info exists portinfo(portdir)]} {
-				set output [format "%-30s %-12s %s" $portinfo(name) $portinfo(version) $portinfo(description)]
+				set output [format "%-30s %-12s %s" $portinfo(name) $portinfo(version) [join $portinfo(description)]]
 			} else {
-				set output [format "%-30s %-14s %-12s %s" $portinfo(name) $portinfo(portdir) $portinfo(version) $portinfo(description)]
+				set output [format "%-30s %-14s %-12s %s" $portinfo(name) $portinfo(portdir) $portinfo(version) [join $portinfo(description)]]
 			}
 			set portfound 1
 			puts $output

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


More information about the macports-changes mailing list