[137927] branches/gsoc15-portfile/github2port/bitbucket2port

Chunyang Xu chunyang at macports.org
Tue Jun 23 10:23:54 PDT 2015


Thanks for the comments. I should have fixed them.

On Wed, Jun 24, 2015 at 12:01 AM, Lawrence Velázquez
<larryv at macports.org> wrote:
> 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


More information about the macports-dev mailing list