[U-Boot] [RFC PATCH 5/5] get_maintainer.pl: adapt to U-Boot tree

Daniel Schwierzeck daniel.schwierzeck at gmail.com
Sun Apr 20 22:57:34 CEST 2014


Switch core maintainer to Tom Rini. Add support for reading
MAINTAINERS and MAINTAINERS.board. Adapt directory layout for
git tree detection.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck at gmail.com>
---

 scripts/get_maintainer.pl | 81 +++++++++++++++++++++++++++--------------------
 1 file changed, 47 insertions(+), 34 deletions(-)

diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index 4198788..8653502 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -61,9 +61,7 @@ my %commit_author_hash;
 my %commit_signer_hash;
 
 my @penguin_chief = ();
-push(@penguin_chief, "Linus Torvalds:torvalds\@linux-foundation.org");
-#Andrew wants in on most everything - 2009/01/14
-#push(@penguin_chief, "Andrew Morton:akpm\@linux-foundation.org");
+push(@penguin_chief, "Tom Rini:trini\@ti.com");
 
 my @penguin_chief_names = ();
 foreach my $chief (@penguin_chief) {
@@ -275,34 +273,46 @@ if (!top_of_kernel_tree($lk_path)) {
 my @typevalue = ();
 my %keyword_hash;
 
-open (my $maint, '<', "${lk_path}MAINTAINERS")
+my $maint;
+open ($maint, '<', "${lk_path}MAINTAINERS.boards")
+    or die "$P: Can't open MAINTAINERS.boards: $!\n";
+read_maintainers($maint);
+close($maint);
+
+open ($maint, '<', "${lk_path}MAINTAINERS")
     or die "$P: Can't open MAINTAINERS: $!\n";
-while (<$maint>) {
-    my $line = $_;
-
-    if ($line =~ m/^(\C):\s*(.*)/) {
-	my $type = $1;
-	my $value = $2;
-
-	##Filename pattern matching
-	if ($type eq "F" || $type eq "X") {
-	    $value =~ s@\.@\\\. at g;       ##Convert . to \.
-	    $value =~ s/\*/\.\*/g;       ##Convert * to .*
-	    $value =~ s/\?/\./g;         ##Convert ? to .
-	    ##if pattern is a directory and it lacks a trailing slash, add one
-	    if ((-d $value)) {
-		$value =~ s@([^/])$@$1/@;
+read_maintainers($maint);
+close($maint);
+
+sub read_maintainers {
+    my ($maint) = @_;
+
+    while (<$maint>) {
+	my $line = $_;
+
+	if ($line =~ m/^(\C):\s*(.*)/) {
+	    my $type = $1;
+	    my $value = $2;
+
+	    ##Filename pattern matching
+	    if ($type eq "F" || $type eq "X") {
+		$value =~ s@\.@\\\. at g;       ##Convert . to \.
+		$value =~ s/\*/\.\*/g;       ##Convert * to .*
+		$value =~ s/\?/\./g;         ##Convert ? to .
+		##if pattern is a directory and it lacks a trailing slash, add one
+		if ((-d $value)) {
+		    $value =~ s@([^/])$@$1/@;
+		}
+	    } elsif ($type eq "K") {
+		$keyword_hash{@typevalue} = $value;
 	    }
-	} elsif ($type eq "K") {
-	    $keyword_hash{@typevalue} = $value;
+	    push(@typevalue, "$type:$value");
+	} elsif (!/^(\s)*$/) {
+	    $line =~ s/\n$//g;
+	    push(@typevalue, $line);
 	}
-	push(@typevalue, "$type:$value");
-    } elsif (!/^(\s)*$/) {
-	$line =~ s/\n$//g;
-	push(@typevalue, $line);
     }
 }
-close($maint);
 
 
 #
@@ -817,22 +827,25 @@ sub top_of_kernel_tree {
     if ($lk_path ne "" && substr($lk_path,length($lk_path)-1,1) ne "/") {
 	$lk_path .= "/";
     }
-    if (   (-f "${lk_path}COPYING")
-	&& (-f "${lk_path}CREDITS")
+    if (   (-f "${lk_path}CREDITS")
 	&& (-f "${lk_path}Kbuild")
 	&& (-f "${lk_path}MAINTAINERS")
 	&& (-f "${lk_path}Makefile")
 	&& (-f "${lk_path}README")
-	&& (-d "${lk_path}Documentation")
 	&& (-d "${lk_path}arch")
-	&& (-d "${lk_path}include")
+	&& (-d "${lk_path}board")
+	&& (-d "${lk_path}common")
+	&& (-d "${lk_path}doc")
 	&& (-d "${lk_path}drivers")
+	&& (-d "${lk_path}dts")
 	&& (-d "${lk_path}fs")
-	&& (-d "${lk_path}init")
-	&& (-d "${lk_path}ipc")
-	&& (-d "${lk_path}kernel")
 	&& (-d "${lk_path}lib")
-	&& (-d "${lk_path}scripts")) {
+	&& (-d "${lk_path}include")
+	&& (-d "${lk_path}net")
+	&& (-d "${lk_path}post")
+	&& (-d "${lk_path}scripts")
+	&& (-d "${lk_path}spl")
+	&& (-d "${lk_path}tools")) {
 	return 1;
     }
     return 0;
-- 
1.9.2



More information about the U-Boot mailing list