From nobody Tue Feb 10 10:03:56 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+111067+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+111067+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=quicinc.com ARC-Seal: i=1; a=rsa-sha256; t=1699644683; cv=none; d=zohomail.com; s=zohoarc; b=jQXjBkGD0q6fkaWiTDFJO9jTVXr2HVuLYMsCNO5bSY6lQXbi1WAoniGgC7Y05JNwvU+6XYWjyUY32gUq2/mv0wva1Bn9svubkElg6jnhk+IRbXNOLVvlMrR1m3jjaZllvRLwSeIf8kmW4kWgubgEayOVYs+QWoz1HAXOTAgJGkU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699644683; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=utMOW3lZio+xdA20WhMwWHtoFYhXnrmGRIbpzZN90nw=; b=E4AFyIvDjtS7cEO7oajxFuMxXIffrGZMGpu4wY3JLSyP6LO0RTRR/t4heqYh9fp2zJahLRLGlb0wsVBmzjPEV3WGL8iWZO9NDfKsEMLkilVFXr79lR1CIniGOmHk9V6ycVg3cyvmo12/eCNAWwEVHflOl5or6z4tjdJ7pQ1fX9Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+111067+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1699644683813603.0301650224364; Fri, 10 Nov 2023 11:31:23 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=Kw1rlwQAAuolhhC+by3XQKU0XbDMr6LQq0fiYK2pU2E=; c=relaxed/simple; d=groups.io; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding:Content-Type; s=20140610; t=1699644683; v=1; b=Prs5Ho1WK/8TFeIZebGDnhYNghnICrgYgvUw8IYOV2pPLAvjSpQAGfCMPNs3cnEJSphYjM2C rmxfoJf3QMxF5HaKawW8dIuEa4uy7fPGcYTOegWawDEvM1g1EzV9RplYryn3em0m0FqpCRiPeHW KXWA/EgUnfUtDttSevc1LA5c= X-Received: by 127.0.0.2 with SMTP id ilJzYY1788612xrN5YodCAxw; Fri, 10 Nov 2023 11:31:23 -0800 X-Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by mx.groups.io with SMTP id smtpd.web10.37046.1699644683001619100 for ; Fri, 10 Nov 2023 11:31:23 -0800 X-Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3AAHQOC0026784; Fri, 10 Nov 2023 19:31:15 GMT X-Received: from nasanppmta02.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3u9dx1hw1h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 10 Nov 2023 19:31:14 +0000 X-Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3AAJVE1T011040 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 10 Nov 2023 19:31:14 GMT X-Received: from qc-i7.qualcomm.com (10.80.80.8) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.39; Fri, 10 Nov 2023 11:31:10 -0800 From: "Leif Lindholm" To: CC: Michael D Kinney , Rebecca Cran , Liming Gao , Bob Feng , Yuwei Chen Subject: [edk2-devel] [PATCH v3 4/5] BaseTools/Scripts/GetMaintainer: Handle reviewer only case Date: Fri, 10 Nov 2023 19:30:52 +0000 Message-ID: <20231110193053.673595-5-quic_llindhol@quicinc.com> In-Reply-To: <20231110193053.673595-1-quic_llindhol@quicinc.com> References: <20231110193053.673595-1-quic_llindhol@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-ORIG-GUID: I4V1nS9g5X8_gn6GGqK6cf5hABgyrtjj X-Proofpoint-GUID: I4V1nS9g5X8_gn6GGqK6cf5hABgyrtjj Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,quic_llindhol@quicinc.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: MN9PbOwlxh3Gag0znVb2JeH2x1787277AA= Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1699644685503100006 Content-Type: text/plain; charset="utf-8" From: Michael D Kinney REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4593 If a package only has reviewers and no maintainers, then also return the maintainers. In order to detect this case, get_maintainers() is updated to return maintainers, reviews, and lists separately instead of a single merged list. This also allows this module to be used by other scripts that need to distinguish between maintainers, reviewers, and lists. Cc: Rebecca Cran Cc: Liming Gao Cc: Bob Feng Cc: Yuwei Chen Cc: Leif Lindholm Signed-off-by: Michael D Kinney --- BaseTools/Scripts/GetMaintainer.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/BaseTools/Scripts/GetMaintainer.py b/BaseTools/Scripts/GetMain= tainer.py index cb3aadbbefb1..1361fb6c0e30 100644 --- a/BaseTools/Scripts/GetMaintainer.py +++ b/BaseTools/Scripts/GetMaintainer.py @@ -76,6 +76,7 @@ def get_section_maintainers(path, section): """Returns a list with email addresses to any M: and R: entries matching the provided path in the provided section.""" maintainers =3D [] + reviewers =3D [] lists =3D [] nowarn_status =3D ['Supported', 'Maintained'] =20 @@ -83,12 +84,18 @@ def get_section_maintainers(path, section): for status in section['status']: if status not in nowarn_status: print('WARNING: Maintained status for "%s" is \'%s\'!' % (= path, status)) - for address in section['maintainer'], section['reviewer']: + for address in section['maintainer']: # Convert to list if necessary if isinstance(address, list): maintainers +=3D address else: maintainers +=3D [address] + for address in section['reviewer']: + # Convert to list if necessary + if isinstance(address, list): + reviewers +=3D address + else: + reviewers +=3D [address] for address in section['list']: # Convert to list if necessary if isinstance(address, list): @@ -96,16 +103,18 @@ def get_section_maintainers(path, section): else: lists +=3D [address] =20 - return {'maintainers': maintainers, 'lists': lists} + return {'maintainers': maintainers, 'reviewers': reviewers, 'lists': l= ists} =20 def get_maintainers(path, sections, level=3D0): """For 'path', iterates over all sections, returning maintainers for matching ones.""" maintainers =3D [] + reviewers =3D [] lists =3D [] for section in sections: recipients =3D get_section_maintainers(path, section) maintainers +=3D recipients['maintainers'] + reviewers +=3D recipients['reviewers'] lists +=3D recipients['lists'] =20 if not maintainers: @@ -115,13 +124,14 @@ def get_maintainers(path, sections, level=3D0): if level =3D=3D 0: recipients =3D get_maintainers('', sections, level=3D= level + 1) maintainers +=3D recipients['maintainers'] + reviewers +=3D recipients['reviewers'] lists +=3D recipients['lists'] else: print("No maintainers set for project.") if not maintainers: return None =20 - return {'maintainers': maintainers, 'lists': lists} + return {'maintainers': maintainers, 'reviewers': reviewers, 'lists': l= ists} =20 def parse_maintainers_line(line): """Parse one line of Maintainers.txt, returning any match group and it= s key.""" @@ -187,7 +197,7 @@ if __name__ =3D=3D '__main__': for file in FILES: print(file) recipients =3D get_maintainers(file, SECTIONS) - ADDRESSES +=3D recipients['maintainers'] + recipients['lists'] + ADDRESSES +=3D recipients['maintainers'] + recipients['reviewers']= + recipients['lists'] =20 for address in list(OrderedDict.fromkeys(ADDRESSES)): if '<' in address and '>' in address: --=20 2.39.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#111067): https://edk2.groups.io/g/devel/message/111067 Mute This Topic: https://groups.io/mt/102513772/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/3901457/1787277/102458076= /xyzzy [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-