From: Don Zickus <dzickus@redhat.com>
To: Joe Perches <joe@perches.com>
Cc: Prarit Bhargava <prarit@redhat.com>,
linux-kernel@vger.kernel.org, jtoppins@redhat.com
Subject: Re: [PATCH] get_maintainer.pl: Add optional .get_maintainer.MAINTAINERS override
Date: Mon, 30 Jul 2018 14:48:48 -0400 [thread overview]
Message-ID: <20180730184848.uooedven2od666hs@redhat.com> (raw)
In-Reply-To: <20180716212019.sjxyxqeltgdcuqqr@redhat.com>
On Mon, Jul 16, 2018 at 05:20:19PM -0400, Don Zickus wrote:
> On Fri, Jul 13, 2018 at 05:11:58PM -0700, Joe Perches wrote:
> > On Fri, 2018-07-13 at 14:51 -0400, Don Zickus wrote:
> > > On Fri, Jul 06, 2018 at 03:14:28PM -0700, Joe Perches wrote:
> > > > 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:
> > >
> > > Hi Joe,
> > >
> > > You are probably busy with stuff, but wanted to softly poke you to see what
> > > is going on with this patch and if there is anything we can help with?
> >
> > Hey Don. No worries.
> >
> > Tell me again if the --find-maintainer-files=<path or file> should
> > be exclusive or should it also read any existing MAINTAINERS file?
>
> Hi Joe,
>
> We were looking for it to be exclusive. If we backport a patch, we want our
> internal maintainers to be cc'd not the upstream maintainers. I don't think
> upstream needs any more spam. :-)
Hi Joe,
ping? Any feedback here?
Cheers,
Don
>
> >
> > What if anything is wrong with what I suggested?
>
> You posted multiple versions of a similar patch, each needed some
> tweaks. But were pretty close to working.
>
> If I had a <dir> with a MAINTAINERS directory beneath it with files behind
> that, I just wanted to run:
>
> get_maintainers.pl --find-maintainer-files <dir>/ # find <dir>/MAINTAINERS/
> get_maintainers.pl --find-maintainer-files <dir>/MAINTAINER/<file> # restricted list
>
> That's it. I attached a patch you provided that worked for me. I added a
>
> + push(@mfiles, "${path}") if -f "${path}";
>
> to your last version of the patch to get things working for me. You may
> want a different solution there.
>
> Cheers,
> Don
>
> ---
> 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,30 @@ 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";
> + push(@mfiles, "${path}") if -f "${path}";
> }
>
> + 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");
> }
> }
>
next prev parent reply other threads:[~2018-07-30 18:48 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-26 18:25 [PATCH] get_maintainer.pl: Add optional .get_maintainer.MAINTAINERS override Prarit Bhargava
2018-06-26 20:16 ` Joe Perches
2018-06-26 22:52 ` Prarit Bhargava
2018-06-26 23:04 ` Joe Perches
2018-06-26 23:29 ` Prarit Bhargava
2018-07-06 17:54 ` Don Zickus
2018-07-06 18:31 ` Joe Perches
2018-07-06 18:44 ` Don Zickus
2018-07-06 19:39 ` Prarit Bhargava
2018-07-06 21:36 ` Joe Perches
2018-07-06 21:58 ` Don Zickus
2018-07-06 22:09 ` Joe Perches
2018-07-06 22:12 ` Don Zickus
2018-07-06 22:14 ` Joe Perches
2018-07-06 22:30 ` Don Zickus
2018-07-06 22:32 ` Don Zickus
2018-07-13 18:51 ` Don Zickus
2018-07-14 0:11 ` Joe Perches
2018-07-16 21:20 ` Don Zickus
2018-07-30 18:48 ` Don Zickus [this message]
2018-07-06 19:47 ` Don Zickus
2018-08-04 1:11 ` [PATCH] get_maintainer.pl: Add -mpath=<path or file> for MAINTAINERS file location Joe Perches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180730184848.uooedven2od666hs@redhat.com \
--to=dzickus@redhat.com \
--cc=joe@perches.com \
--cc=jtoppins@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=prarit@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox