[137927] branches/gsoc15-portfile/github2port/bitbucket2port
Lawrence Velázquez
larryv at macports.org
Tue Jun 23 09:01:06 PDT 2015
On Jun 23, 2015, at 3:24 AM, chunyang at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-dev/attachments/20150623/a9a946c4/attachment.html>
More information about the macports-dev
mailing list