[33560] trunk/base/src/port1.0/portlint.tcl

afb at macports.org afb at macports.org
Wed Jan 30 00:56:36 PST 2008


Revision: 33560
          http://trac.macosforge.org/projects/macports/changeset/33560
Author:   afb at macports.org
Date:     2008-01-30 00:56:35 -0800 (Wed, 30 Jan 2008)

Log Message:
-----------
match both port directory and parent directory (#13263)

Modified Paths:
--------------
    trunk/base/src/port1.0/portlint.tcl

Modified: trunk/base/src/port1.0/portlint.tcl
===================================================================
--- trunk/base/src/port1.0/portlint.tcl	2008-01-30 08:43:23 UTC (rev 33559)
+++ trunk/base/src/port1.0/portlint.tcl	2008-01-30 08:56:35 UTC (rev 33560)
@@ -145,8 +145,10 @@
 	set portfile ${portpath}/Portfile
 	set portdirs [split ${portpath} /]
 	set last [llength $portdirs]
-	incr last -2
+	incr last -1
 	set portdir [lindex $portdirs $last]
+	incr last -1
+	set portcatdir [lindex $portdirs $last]
 	set groupdir ${portresourcepath}/group
 
 	set warnings 0
@@ -402,13 +404,19 @@
         incr warnings
     }
 
-    # this check is only valid for ports stored in the regular tree directories
-    if {$portdir != $category} {
-        ui_error "Portfile directory $portdir does not match primary category $category"
+    # these checks are only valid for ports stored in the regular tree directories
+    if {$portcatdir != $category} {
+        ui_error "Portfile parent directory $portcatdir does not match primary category $category"
         incr errors
     } else {
-        ui_info "OK: Portfile directory matches primary category"
+        ui_info "OK: Portfile parent directory matches primary category"
     }
+    if {$portdir != $portname} {
+        ui_error "Portfile directory $portdir does not match port name $portname"
+        incr errors
+    } else {
+        ui_info "OK: Portfile directory matches port name"
+    }
 
     if {[info exists patchfiles]} {
         foreach patchfile $patchfiles {

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080130/2ca4e22d/attachment.html


More information about the macports-changes mailing list