diff --git ports-mgmt/portlint/src/portlint.pl ports-mgmt/portlint/src/portlint.pl index 3081ac345bb5..dcd662db47a3 100644 --- ports-mgmt/portlint/src/portlint.pl +++ ports-mgmt/portlint/src/portlint.pl @@ -307,6 +307,8 @@ foreach my $i (@checker) { } } +checkpatches(<$makevar{FILESDIR}/patch-*>); + if ($committer) { sub find_proc { return if /^\.\.?$/; @@ -1035,6 +1037,26 @@ sub checklastline { close(IN); } +sub checkpatches { + my (@patchfiles) = @_; + my @patched_files; + foreach my $file (@patchfiles) { + open(IN, "< $file") || return 0; + while () { + if ($_ =~ /^\+\+\+\s(.*?)\s.*/) { + #if($1 ~~ @patched_files) { + if (grep {$_ eq $1} @patched_files) { + &perror("WARN", $file, -1, "$1 patched multiple times"); + } + else { + push(@patched_files, $1); + } + + } + } + } +} + sub checkpatch { my($file) = @_; my($whole);