[50141] trunk/base/src/port1.0/portlint.tcl
jmr at macports.org
jmr at macports.org
Sun Apr 26 07:01:55 PDT 2009
Revision: 50141
http://trac.macports.org/changeset/50141
Author: jmr at macports.org
Date: 2009-04-26 07:01:55 -0700 (Sun, 26 Apr 2009)
Log Message:
-----------
lint: don't check categories against a hardcoded list (comparing with parent dir is enough), detect empty categories list
Modified Paths:
--------------
trunk/base/src/port1.0/portlint.tcl
Modified: trunk/base/src/port1.0/portlint.tcl
===================================================================
--- trunk/base/src/port1.0/portlint.tcl 2009-04-26 13:53:09 UTC (rev 50140)
+++ trunk/base/src/port1.0/portlint.tcl 2009-04-26 14:01:55 UTC (rev 50141)
@@ -32,56 +32,6 @@
"sunos" \
]
-set lint_categories [list \
- "aqua" \
- "archivers" \
- "audio" \
- "benchmarks" \
- "cad" \
- "comms" \
- "cross" \
- "databases" \
- "devel" \
- "editors" \
- "emulators" \
- "erlang" \
- "finance" \
- "fuse" \
- "games" \
- "genealogy" \
- "gis" \
- "gnome" \
- "gnustep" \
- "graphics" \
- "iphone" \
- "irc" \
- "java" \
- "kde" \
- "lang" \
- "mail" \
- "math" \
- "multimedia" \
- "net" \
- "news" \
- "office" \
- "palm" \
- "perl" \
- "php" \
- "print" \
- "python" \
- "ruby" \
- "science" \
- "security" \
- "shells" \
- "sysutils" \
- "tex" \
- "textproc" \
- "www" \
- "x11" \
- "xfce" \
- "zope" \
- ]
-
set lint_required [list \
"name" \
"version" \
@@ -306,7 +256,7 @@
global maintainers homepage master_sites checksums patchfiles
global depends_lib depends_build depends_run distfiles fetch.type
- global lint_portsystem lint_platforms lint_categories
+ global lint_portsystem lint_platforms
global lint_required lint_optional
if (!$seen_portsystem) {
@@ -381,19 +331,13 @@
}
if {[info exists categories]} {
- set category [lindex $categories 0]
- if {[lsearch -exact $lint_categories $category] == -1} {
- ui_error "Unknown category: $category"
- incr errors
+ if {[llength $categories] > 0} {
+ set category [lindex $categories 0]
+ ui_info "OK: Found primary category: $category"
} else {
- ui_info "OK: Found category: $category"
+ ui_error "Categories list is empty"
+ incr errors
}
- foreach secondary $categories {
- if {[string match $secondary $category]} {
- continue
- }
- ui_info "OK: Found category: $secondary"
- }
}
if {![string is integer -strict $portepoch]} {
@@ -506,7 +450,7 @@
}
# these checks are only valid for ports stored in the regular tree directories
- if {$portcatdir != $category} {
+ if {[info exists category] && $portcatdir != $category} {
ui_error "Portfile parent directory $portcatdir does not match primary category $category"
incr errors
} else {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090426/632efa34/attachment-0001.html>
More information about the macports-changes
mailing list