[86016] trunk/base/src/port1.0/portlint.tcl
snc at macports.org
snc at macports.org
Tue Oct 18 08:31:10 PDT 2011
Revision: 86016
http://trac.macports.org/changeset/86016
Author: snc at macports.org
Date: 2011-10-18 08:31:09 -0700 (Tue, 18 Oct 2011)
Log Message:
-----------
base: handle braces when testing last character of each license
Modified Paths:
--------------
trunk/base/src/port1.0/portlint.tcl
Modified: trunk/base/src/port1.0/portlint.tcl
===================================================================
--- trunk/base/src/port1.0/portlint.tcl 2011-10-18 14:30:31 UTC (rev 86015)
+++ trunk/base/src/port1.0/portlint.tcl 2011-10-18 15:31:09 UTC (rev 86016)
@@ -508,17 +508,27 @@
# If maintainer set license, it must follow correct format
- set licenses [split $license '\ ']
+ set licenses [split [string map { \{ '' \} ''} $license] '\ ']
set prev ''
foreach test $licenses {
+ ui_debug "Checking format of license '${test}'"
# space instead of hyphen
if {[string is double -strict $test]} {
ui_error "Invalid license '${prev} ${test}': missing hyphen between ${prev} ${test}"
# missing hyphen
- } elseif {![string equal -nocase "X11" $test] && [regexp {([^-a-z]+)$} $test license_full license_name license_vers]} {
- ui_error "invalid license '${test}': missing hyphen between ${license_name} ${license_vers}"
+ } elseif {![string equal -nocase "X11" $test]} {
+ set subtests [split $test '-']
+ foreach subtest $subtests {
+ ui_debug "testing ${subtest}"
+ if {[string is alpha -strict [string index $subtest 0]]} {
+ set license_end [string index $subtest end]
+ if {[string equal "+" $license_end] || [string is integer -strict $license_end]} {
+ ui_error "invalid license '${test}': missing hyphen before version"
+ }
+ }
+ }
}
# BSD-2 => BSD
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20111018/5f5134dc/attachment.html>
More information about the macports-changes
mailing list