Re: [PATCH] get_maintainer.pl: Add optional .get_maintainer.MAINTAINERS override

From: Prarit Bhargava
Date: Tue Jun 26 2018 - 18:52:43 EST




On 06/26/2018 04:16 PM, Joe Perches wrote:
> On Tue, 2018-06-26 at 14:25 -0400, Prarit Bhargava wrote:
>> OSes have additional maintainers that should be cc'd on patches or may
>> want to circulate internal patches.
>>
>> Parse the .get_maintainer.MAINTAINERS file. Entries in the file
>> can begin with a '+' to indicate the email and list entries should be
>> added to the exiting MAINTAINERS output, or a '-' to indicate that the
>> entries should override the existing MAINTAINERS file.
>>
>> Also add a help entry for the .get_maintainers.ignore file.
>
> I see no reason for this patch to be applied.
> Why should it?

The kernel has other vendor/OS changes like my patch, for example, 4efb442cc12e
("kernel/panic.c: add TAINT_AUX"). From that commit message

Add an auxiliary taint flag to be used by distros and others. This
obviates the need to forward-port whatever internal solutions people
have in favor of a single flag which they can map arbitrarily to a
definition of their pleasing.

The same principle should be applied to my patch in that distros no longer would
need to forward-port internal solutions similar to this.

> Why shouldn't this be in your private repository?

If you don't want it I'll carry it forward but that's a loss for both of us, and
as pointed out in the above commit, other distros. If you do want to reject the
patch please let me know and I'll only submit the "get_maintainer.ignore" help
chunk.

P.
>
>> Signed-off-by: Prarit Bhargava <prarit@xxxxxxxxxx>
>> Cc: Joe Perches <joe@xxxxxxxxxxx>
>> Cc: dzickus@xxxxxxxxxx
>> Cc: jtoppins@xxxxxxxxxx
>> ---
>> scripts/get_maintainer.pl | 34 ++++++++++++++++++++++++++++++++++
>> 1 file changed, 34 insertions(+)
>>
>> diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
>> index c87fa734e3e1..239f4d2ce972 100755
>> --- a/scripts/get_maintainer.pl
>> +++ b/scripts/get_maintainer.pl
>> @@ -384,6 +384,32 @@ sub find_ignore_git {
>> read_all_maintainer_files();
>>
>> sub read_all_maintainer_files {
>> + my $conf = which_conf(".get_maintainer.MAINTAINERS");
>> + if ( -f $conf) {
>> + my @conf_args;
>> + my $add = 0;
>> + open(my $conffile, '<', "$conf")
>> + or warn "$P: Can't find a readable .get_maintainer.MAINTAINERS file $!\n";
>> + while (<$conffile>) {
>> + my $line = $_;
>> + if ($line =~ m/^\+/ ) {
>> + $add = 1;
>> + }
>> + next if ($line =~ m/^\s*#/);
>> + $line =~ s/^\+//g;
>> + $line =~ s/^\-//g;
>> + $line =~ s/\s*\n?$//;
>> + push(@mfiles, $line);
>> + }
>> + close($conffile);
>> + if ($add eq 0) {
>> + foreach my $file (@mfiles) {
>> + read_maintainer_file("$file");
>> + }
>> + return;
>> + }
>> + }
>> +
>> if (-d "${lk_path}MAINTAINERS") {
>> opendir(DIR, "${lk_path}MAINTAINERS") or die $!;
>> my @files = readdir(DIR);
>> @@ -1068,6 +1094,14 @@ Notes:
>> Entries in this file can be any command line argument.
>> This file is prepended to any additional command line arguments.
>> Multiple lines and # comments are allowed.
>> + File ".get_maintainer.ignore", if it exists in the linux kernel source root
>> + directory, can contain a list of email addresses to ignore. Multiple
>> + lines and # comments are allowed.
>> + File ".get_maintainer.MAINTAINERS", if it exists in the linux kernel source
>> + root directory, can change the location of the MAINTAINERS file.
>> + Entries beginning with a '+' are added to the default list, and
>> + entries beginning with a '-' override the existing MAINTAINERS list
>> + lookup. Multiple lines and # comments are allowed.
>> Most options have both positive and negative forms.
>> The negative forms for --<foo> are --no<foo> and --no-<foo>.
>>