Skip to content
Permalink
Browse files

Fix provides action. The portspec parser was getting hung up by the s…

…yntax.

Reported by: blb...Thanks!

git-svn-id: https://svn.macports.org/repository/macports/trunk/base@14530 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
jdberry committed Oct 10, 2005
1 parent e8e4f23 commit e79033d6c3305509fb50ed50d04a169e95b9c7cb
Showing with 7 additions and 3 deletions.
  1. +7 −3 src/port/port.tcl
@@ -2,7 +2,7 @@
#\
exec @TCLSH@ "$0" "$@"
# port.tcl
# $Id: port.tcl,v 1.117 2005/10/10 02:49:29 jberry Exp $
# $Id: port.tcl,v 1.118 2005/10/10 14:11:39 jberry Exp $
#
# Copyright (c) 2004 Robert Shaw <rshaw@opendarwin.org>
# Copyright (c) 2002 Apple Computer, Inc.
@@ -976,8 +976,12 @@ proc parseFullPortSpec { namename vername varname optname } {

if { [moreargs] } {
# Look first for a potential portname
#
# We need to allow a wide variaty of tokens here, because of actions like "provides"
# so we take a rather lenient view of what a "portname" is. We allow
# anything that doesn't look like either a variant, a version, or an option
set token [lookahead]
if {[regexp {^\w+} $token match]} {
if {![regexp {^(\d.*|[-+].*|[[:alpha:]_]+[\w\.]*=.*)} $token match]} {
set portname $token
advance
}
@@ -1691,7 +1695,7 @@ switch -- $action {
foreachport $portlist {
set opts {}
foreach { key value } [array get options] {
lappend opts "$key=\"$value\""
lappend opts "$key=$value"
}

puts [format "%-30s %s %s" $portname [composite_version $portversion [array get variations]] [join $opts " "]]

0 comments on commit e79033d

Please sign in to comment.
You can’t perform that action at this time.