From patchwork Mon Jul 17 18:18:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 9845923 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 14D1860212 for ; Mon, 17 Jul 2017 18:21:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0AAAA21F61 for ; Mon, 17 Jul 2017 18:21:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F337628522; Mon, 17 Jul 2017 18:21:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7E5D121F61 for ; Mon, 17 Jul 2017 18:21:24 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dXAbf-0007vL-71; Mon, 17 Jul 2017 18:18:55 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dXAbe-0007vF-Bd for xen-devel@lists.xen.org; Mon, 17 Jul 2017 18:18:54 +0000 Received: from [193.109.254.147] by server-11.bemta-6.messagelabs.com id E9/AB-03612-D8FFC695; Mon, 17 Jul 2017 18:18:53 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrJLMWRWlGSWpSXmKPExsVysyfVTbf3f06 kwfUfrBZLPi5mcWD0OLr7N1MAYxRrZl5SfkUCa8b8Y78ZC54KVSw7PoWtgfEHXxcjJ4eQwEZG ifl3VLoYuYDs04wSb39MYQNJsAloStz5/IkJxBYRkJa49vkyI0gRs8BzRolJLTNYQRLCAmESd 7uXANkcHCwCqhI/nkSAhHkFLCU+3JvECGJLCMhL7Gq7yDqBkXMBI8MqRvXi1KKy1CJdY72kos z0jJLcxMwcXUMDM73c1OLixPTUnMSkYr3k/NxNjEBvMQDBDsaOf06HGCU5mJREeS+yZUcK8SX lp1RmJBZnxBeV5qQWH2KU4eBQkuA1+JcTKSRYlJqeWpGWmQMMG5i0BAePkgjv2b9Aad7igsTc 4sx0iNQpRl2OVxP+f2MSYsnLz0uVEud9BVIkAFKUUZoHNwIWwpcYZaWEeRmBjhLiKUgtys0sQ ZV/xSjOwagkzOsBcglPZl4J3KZXQEcwAR0h7At2REkiQkqqgbEvQvLew/uLm1d/YfNrex5mYD 3ZdJPXTbdIoQNfFR9OP5vZnb1vxblihaTUHKbDa9dYyN+yU5X9N+ewaZRBcbijtGFP5VbhJOG MwlPbnt7w8D17YK/m/meVK3/Y/O9I7tAM2rtI8fKOzm3nbhjES1433lh3rWinU6ocH5fRsR/+ sQ9NLO00viqxFGckGmoxFxUnAgBSOw9nXAIAAA== X-Env-Sender: julien.grall@arm.com X-Msg-Ref: server-10.tower-27.messagelabs.com!1500315532!84352754!1 X-Originating-IP: [217.140.101.70] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.25; banners=-,-,- X-VirusChecked: Checked Received: (qmail 6516 invoked from network); 17 Jul 2017 18:18:52 -0000 Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by server-10.tower-27.messagelabs.com with SMTP; 17 Jul 2017 18:18:52 -0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 113572B; Mon, 17 Jul 2017 11:18:52 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.206.53]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6D6EC3F577; Mon, 17 Jul 2017 11:18:50 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Mon, 17 Jul 2017 19:18:44 +0100 Message-Id: <20170717181844.12970-1-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 Cc: sstabellini@kernel.org, wei.liu2@citrix.com, George.Dunlap@eu.citrix.com, andrew.cooper3@citrix.com, ian.jackson@eu.citrix.com, tim@xen.org, Julien Grall , jbeulich@suse.com Subject: [Xen-devel] [PATCH] scripts/get_maintainers.pl: Don't blindly drop "THE REST" maintainers X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP "THE REST" maintainers should always be CCed for any modification that don't fall under the responsability of a specific component maintainer. However, the script get_maintainers.pl will remove "THE REST" maintainers as soon as one maintainer of a specific component will be present. Fix the script once for all. Signed-off-by: Julien Grall Acked-by: Andrew Cooper Acked-by: Ian Jackson --- I am getting annoyed at requesting contributors to CC "THE REST" because the script didn't properly return the list of maintainers. This should now be fixed. --- scripts/get_maintainer.pl | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index 2804a5b5df..d3076adfd8 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl @@ -571,11 +571,15 @@ sub get_maintainers { # Find responsible parties my %exact_pattern_match_hash = (); + # By default "THE REST" will be suppressed. + my $do_not_suppress_the_rest = 0; foreach my $file (@files) { my %hash; my $tvi = find_first_section(); + # Unless stated otherwise, a file is maintained by "THE REST" + my $file_maintained_by_the_rest = 1; while ($tvi < @typevalue) { my $start = find_starting_index($tvi); my $end = find_ending_index($tvi); @@ -633,6 +637,14 @@ sub get_maintainers { foreach my $line (sort {$hash{$b} <=> $hash{$a}} keys %hash) { add_categories($line); + my $role = get_maintainer_role($line); + + # Check the role, if it is not "THE REST" then the file is not + # only maintained by "THE REST". + if ( get_maintainer_role($line) ne "supporter:THE REST" ) { + $file_maintained_by_the_rest = 0; + } + if ($sections) { my $i; my $start = find_starting_index($line); @@ -657,6 +669,9 @@ sub get_maintainers { print("\n"); } } + # If the file is only maintained by "THE REST", then CC all of them on + # the patch. + $do_not_suppress_the_rest = 1 if $file_maintained_by_the_rest; } if ($keywords) { @@ -666,7 +681,8 @@ sub get_maintainers { } } - if ($email_drop_the_rest_supporter_if_supporter_found && $#email_to > 0) { + if ($email_drop_the_rest_supporter_if_supporter_found && + !$do_not_suppress_the_rest && $#email_to > 0) { my @email_new; my $do_replace = 0; foreach my $email (@email_to) {