Ticket #48680: port-lint-add-option-to-disable-parent-dirs-checks.diff
File port-lint-add-option-to-disable-parent-dirs-checks.diff, 2.6 KB (added by xuchunyang (Chunyang Xu), 9 years ago) |
---|
-
src/port/port.tcl
4412 4412 variants {index} 4413 4413 clean {all archive dist work logs} 4414 4414 mirror {new} 4415 lint {nitpick }4415 lint {nitpick nodir} 4416 4416 select {list set show summary} 4417 4417 log {{phase 1} {level 1}} 4418 4418 upgrade {force enforce-variants no-replace no-rev-upgrade} -
src/port1.0/portlint.tcl
123 123 } 124 124 125 125 proc portlint::lint_main {args} { 126 global UI_PREFIX name portpath porturl ports_lint_nitpick 126 global UI_PREFIX name portpath porturl ports_lint_nitpick ports_lint_nodir 127 127 set portfile ${portpath}/Portfile 128 128 set portdirs [split ${portpath} /] 129 129 set last [llength $portdirs] … … 144 144 set nitpick false 145 145 } 146 146 147 if {[info exists ports_lint_nodir] && $ports_lint_nodir eq "yes"} { 148 set nodir true 149 } else { 150 set nodir false 151 } 152 147 153 set topline_number 1 148 154 set require_blank false 149 155 set require_after "" … … 658 664 659 665 } 660 666 661 # these checks are only valid for ports stored in the regular tree directories 662 if {[info exists category] && $portcatdir != $category} { 663 ui_error "Portfile parent directory $portcatdir does not match primary category $category" 664 incr errors 665 } else { 666 ui_info "OK: Portfile parent directory matches primary category" 667 if !{$nodir} { 668 # these checks are only valid for ports stored in the regular tree directories 669 if {[info exists category] && $portcatdir != $category} { 670 ui_error "Portfile parent directory $portcatdir does not match primary category $category" 671 incr errors 672 } else { 673 ui_info "OK: Portfile parent directory matches primary category" 674 } 675 if {$portdir != $name} { 676 ui_error "Portfile directory $portdir does not match port name $name" 677 incr errors 678 } else { 679 ui_info "OK: Portfile directory matches port name" 680 } 667 681 } 668 if {$portdir != $name} {669 ui_error "Portfile directory $portdir does not match port name $name"670 incr errors671 } else {672 ui_info "OK: Portfile directory matches port name"673 }674 682 675 683 if {$nitpick && [info exists patchfiles]} { 676 684 foreach patchfile $patchfiles {