On Jun 23, 2015, at 3:24 AM, chuny...@macports.org wrote:

> +    if {[regexp {[0-9]+([.-][0-9]+)+} $v version]} {
> +        if {[string length $version] < [string length $v]} {
> +            set tag_prefix [string range $v 0 [expr [string first $version 
> $v] -1]]
> +        }
> +    }
You might be able to do this a bit more cleanly with "regexp -indices".

If the "regexp" call does match, how can $version ever have the same length as 
$v?

> +    return [concat $author $project [parse_tarball_name $tarball]]
You should probably use the "list" command here instead of "concat". The 
"concat" command just concatenates its arguments without ensuring that the 
result is a well-formed Tcl list. You can't be sure that $author, $project, and 
$tarball are clean.

vq
_______________________________________________
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev

Reply via email to