Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp115837imm; Fri, 6 Jul 2018 15:15:30 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdZg/bEIu7QLbh5ycsm0O9pKQY380YCR3EHdEPxrZEhQnaaTm5oMLsVEIdcmYLzxWIGjcBS X-Received: by 2002:a17:902:5a4f:: with SMTP id f15-v6mr11804224plm.253.1530915330633; Fri, 06 Jul 2018 15:15:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530915330; cv=none; d=google.com; s=arc-20160816; b=LC089lccHOzpwieYWzSW/YqT46kSAoJnSYfs6SfSLhpwpq80WA3ZN4fcn3+yLdGIQ2 +1n5l/mpInEhzcKV8msMtPPFvShpwq3TyP8dgM6JMBa+1A+K68SgrorwZ7Olb+BQenm4 iiRhCLmajIhYJp5JoMMbVvypgIGT9j9NoK36iuTwfUP2sXcv+jhAuZsRUaEAzcaaGAgl bSobHGTqstRgRx1xiNYJWYCqPoJu2uDCpWF+Y9fgTehTczlR+EkC0uZeyL6ouIvBSogr fLOjt2qVb4THGKQC8tkEl6A/oIwGRf/yoZXpszzl2jeawa6lFc3Jb0UnZI2ge+WTJiW5 jWnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=BnEUiqgt1h7T77jJJNxR7UVHY0aT4iUbSe+rNNyRdEg=; b=C/SclOzkPbvrG6/wLdpasSbci15WY9eVLC2DIp1KfWteLsOTFlH1Oy2TkpJ1vSeCW2 BE2J1D2O2JeYxd8sJrOaJm31ohwciT1bTqso/amgFtMoF+hAbwvXzxbyJBblugv0z6Ip 2QBxY+hYg0atzZEiDP/ckpL5cJeO2+Xe6kju7F40X82/AXTQnimI2Esco9Hur7BTr8uY 1Ypitf6/HgGNoOlNCIxerq0xtLf6SI0SinGhhCbr3nWizj33aS2+BEZt/S8O3A82jVSd OFbS++kMiXWOcSoRIU1kXnck9WR2nX/KJYHMp11+KiQw2f0lONilNZzp4zZ4Y1m8RrMu OfPQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t66-v6si9894268pfg.292.2018.07.06.15.15.16; Fri, 06 Jul 2018 15:15:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753743AbeGFWOc (ORCPT + 99 others); Fri, 6 Jul 2018 18:14:32 -0400 Received: from smtprelay0109.hostedemail.com ([216.40.44.109]:34869 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752461AbeGFWOb (ORCPT ); Fri, 6 Jul 2018 18:14:31 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay04.hostedemail.com (Postfix) with ESMTP id CE315180A8CBE; Fri, 6 Jul 2018 22:14:30 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::,RULES_HIT:41:69:355:379:541:599:982:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1542:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3354:3622:3653:3866:3867:3870:4250:4321:4605:5007:6299:7903:8957:9040:9592:10004:10400:10848:11026:11232:11658:11914:12043:12114:12291:12438:12555:12683:12740:12760:12895:13255:13439:14110:14659:14721:21080:21324:21433:21627:30054:30091,0,RBL:47.151.153.53:@perches.com:.lbl8.mailshell.net-62.8.0.100 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:25,LUA_SUMMARY:none X-HE-Tag: patch03_273ea6b0f595c X-Filterd-Recvd-Size: 4004 Received: from XPS-9350.home (unknown [47.151.153.53]) (Authenticated sender: joe@perches.com) by omf08.hostedemail.com (Postfix) with ESMTPA; Fri, 6 Jul 2018 22:14:29 +0000 (UTC) Message-ID: <9efeba75a47e9b0c40d5b9e5078598ff4a31f196.camel@perches.com> Subject: Re: [PATCH] get_maintainer.pl: Add optional .get_maintainer.MAINTAINERS override From: Joe Perches To: Don Zickus Cc: Prarit Bhargava , linux-kernel@vger.kernel.org, jtoppins@redhat.com Date: Fri, 06 Jul 2018 15:14:28 -0700 In-Reply-To: <5ebb181efcdd2cdb3c1ee8eac9bba26f5759a0ea.camel@perches.com> References: <20180626182505.4176-1-prarit@redhat.com> <601f0e6bf3baa88b9f6145e635d728a435542292.camel@perches.com> <20180706175419.6irtvs64e6dbz7hk@redhat.com> <20180706184411.ilzbt7fxuje2nhx6@redhat.com> <716eb88d-31ac-c488-f799-dec9c9afb5af@redhat.com> <948af2d06623e8fcca6f0c0fd300a65bbfd1c6fa.camel@perches.com> <20180706215851.sqpibusyqukbh55g@redhat.com> <5ebb181efcdd2cdb3c1ee8eac9bba26f5759a0ea.camel@perches.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.28.1-2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2018-07-06 at 15:09 -0700, Joe Perches wrote: > On Fri, 2018-07-06 at 17:58 -0400, Don Zickus wrote: > > We have an internal use case of multiple MAINTAINER files, some folks have > > more rights to patches than others so they are not allowed to be cc'd (think > > embargoed stuff). How about: --- scripts/get_maintainer.pl | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index c87fa734e3e1..f7a7d46340a8 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl @@ -60,7 +60,7 @@ my $pattern_depth = 0; my $self_test = undef; my $version = 0; my $help = 0; -my $find_maintainer_files = 0; +my $find_maintainer_files; my $vcs_used = 0; @@ -262,7 +262,7 @@ if (!GetOptions( 'sections!' => \$sections, 'fe|file-emails!' => \$file_emails, 'f|file' => \$from_filename, - 'find-maintainer-files' => \$find_maintainer_files, + 'find-maintainer-files:s' => \$find_maintainer_files, 'self-test:s' => \$self_test, 'v|version' => \$version, 'h|help|usage' => \$help, @@ -384,26 +384,29 @@ sub find_ignore_git { read_all_maintainer_files(); sub read_all_maintainer_files { - if (-d "${lk_path}MAINTAINERS") { - opendir(DIR, "${lk_path}MAINTAINERS") or die $!; - my @files = readdir(DIR); - closedir(DIR); - foreach my $file (@files) { - push(@mfiles, "${lk_path}MAINTAINERS/$file") if ($file !~ /^\./); - } - } - - if ($find_maintainer_files) { - find( { wanted => \&find_is_maintainer_file, - preprocess => \&find_ignore_git, - no_chdir => 1, - }, "${lk_path}"); + my $path = defined $find_maintainer_files && $find_maintainer_files ne "" + ? $find_maintainer_files : $lk_path; + if (-d "${path}MAINTAINERS") { + opendir(DIR, "${path}MAINTAINERS") or die $!; + my @files = readdir(DIR); + closedir(DIR); + foreach my $file (@files) { + push(@mfiles, "${path}MAINTAINERS/$file") if ($file !~ /^\./); + } + } + + if (defined $find_maintainer_files && (-d $find_maintainer_files)) { + find( { wanted => \&find_is_maintainer_file, + preprocess => \&find_ignore_git, + no_chdir => 1, + }, "${path}"); } else { - push(@mfiles, "${lk_path}MAINTAINERS") if -f "${lk_path}MAINTAINERS"; + push(@mfiles, "${path}MAINTAINERS") if -f "${path}MAINTAINERS"; } + die "$P: No MAINTAINER files found in $path\n" if (scalar(@mfiles) == 0); foreach my $file (@mfiles) { - read_maintainer_file("$file"); + read_maintainer_file("$file"); } }