From nobody Tue May 14 19:28:52 2024 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+111043+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+111043+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1699635851; cv=none; d=zohomail.com; s=zohoarc; b=OBQQoKrlYx61ipWOO47Z/2MM3gwJrpL9rs5ZBaU0Awau5Wm1Y8g6nI0iEtmbuAL9rJIM95LZ7Vi2t+SAM7ikpans6rRYIPHaG2qPLFtqEboW2MCJkOFj/DxkduWFnovreSlcY8F9iRjx0abJqgbW37d58H3a4llCOq/YWnz1ktI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699635851; h=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=67lRiLv1QYOlAi+9JDhw/qROM2v/9nzBUUIAcsP0pr8=; b=VEsG3Z0k1PwW+z8yqkGaJTkazxJJwT6KMhiH75Xu1MjbuXt/z73nINOaUwfwwUTqpjLUaHxm6ngKfO3SViUHHx8JoEjU7gKSnl5kEj1rE8y4L6BYWFoDdv2F1iMoLhLSaSwOwaVmYuo2t0HWhDoBKUV40NNHufvLa97pcX+cqA8= 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+111043+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 1699635851272137.90584757326656; Fri, 10 Nov 2023 09:04:11 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=n/Dnd5Ur+BeDRZGgAkuh1CexClW3BxX8M6qQ4LxRSAk=; 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; s=20140610; t=1699635851; v=1; b=b4oBcSEd2cWC+Bt7rgzuo/HXLRkRL6zR3eTiYi5a7ywvoYgulGitaxo2yTjwlZkUt5MZEkLd GLFTmD+014asuC4ZSVS+MfPaL3iZ1bhAo+eswZqdLL4j0mjUJNPgFL1B+McSbSkhBffykZ62yCo +smcSPAnTi7lu0gp0mku9PF4= X-Received: by 127.0.0.2 with SMTP id O3khYY1788612x3CA5WdgZ4p; Fri, 10 Nov 2023 09:04:11 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by mx.groups.io with SMTP id smtpd.web11.33120.1699635848781681059 for ; Fri, 10 Nov 2023 09:04:09 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10890"; a="8858161" X-IronPort-AV: E=Sophos;i="6.03,291,1694761200"; d="scan'208";a="8858161" X-Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Nov 2023 09:04:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.03,291,1694761200"; d="scan'208";a="11525421" X-Received: from mdkinney-mobl.amr.corp.intel.com ([10.212.164.220]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Nov 2023 09:04:08 -0800 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Rebecca Cran , Liming Gao , Bob Feng , Yuwei Chen , Leif Lindholm Subject: [edk2-devel] [edk2-stable202311][Patch v2 1/4] BaseTools/Scripts/GetMaintainer: Fix logic bug collecting maintainers Date: Fri, 10 Nov 2023 09:04:00 -0800 Message-Id: <20231110170403.1068-2-michael.d.kinney@intel.com> In-Reply-To: <20231110170403.1068-1-michael.d.kinney@intel.com> References: <20231110170403.1068-1-michael.d.kinney@intel.com> MIME-Version: 1.0 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,michael.d.kinney@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 4RRWXqKRtxOdy41eyxL4BZJEx1787277AA= Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1699635852022100005 Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4593 Fix logic bug where maintainers is incorrectly added to 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BaseTools/Scripts/GetMaintainer.py b/BaseTools/Scripts/GetMain= tainer.py index d1e042c0afe4..2a3147c059b5 100644 --- a/BaseTools/Scripts/GetMaintainer.py +++ b/BaseTools/Scripts/GetMaintainer.py @@ -88,7 +88,7 @@ def get_section_maintainers(path, section): if isinstance(address, list): maintainers +=3D address else: - lists +=3D [address] + maintainers +=3D [address] for address in section['list']: # Convert to list if necessary if isinstance(address, list): --=20 2.40.1.windows.1 -=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 (#111043): https://edk2.groups.io/g/devel/message/111043 Mute This Topic: https://groups.io/mt/102510789/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- From nobody Tue May 14 19:28:52 2024 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+111046+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+111046+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1699635853; cv=none; d=zohomail.com; s=zohoarc; b=C8P6DgiJjgIRVEQaWfmvK6bm7RKLcJ1jjuuYaG2CifpcybC+t4N9166lHS1xSsMzXzygcHW6Y9mV1lYhWDIH0weOZsfBS4dxYubmNerF2l4O68xcOjuqUDJU6RKuTUU7H7ZhMnBbs6sqpVruIo1kdxLfNFnYnAmiLNM77z25+vk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699635853; h=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=7+sBVDVUbvDhM77qSSnLljCUR+C1ZO2fzM9VdJHn/qI=; b=itaY7oRpY46sAUyW56NBkdYymRGpikEX+di0gCyJibDlHn7NXffJ4jTZ7HEzdhPAa/MaW7lIZtPru1W8WJdduf3WLZtx7/AdbN/9B7GDx8wFNQiu3D8OzsIxYB16R47tsWI61oZwbK3LidH3wr6mgb2l9MIfVEWIfGdLzkrTvPI= 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+111046+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 1699635853220693.9776179056566; Fri, 10 Nov 2023 09:04:13 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=8kDfI2CQ749t1Avs+Pd75LJ5vQ/W90S+0VQMczFcGhQ=; 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; s=20140610; t=1699635852; v=1; b=K7wNhdPrIr5VPkaDUcWIOapGaET4FOeOziPfW3t9EXJdz8gABP8SxiH4dy907IIGeirJcrWq 3vTKmlK6lN/xalMNiY81iJbUgptOzoW7Z+8GAAjZbqUW6Iy8xJm7VNEAj5AEZYJoLYgHZ25itr4 TEfOimvZXYfnnAibECip95L0= X-Received: by 127.0.0.2 with SMTP id tsBXYY1788612xS023EHYe4E; Fri, 10 Nov 2023 09:04:12 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by mx.groups.io with SMTP id smtpd.web10.32852.1699635850058618181 for ; Fri, 10 Nov 2023 09:04:10 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10890"; a="8858165" X-IronPort-AV: E=Sophos;i="6.03,291,1694761200"; d="scan'208";a="8858165" X-Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Nov 2023 09:04:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.03,291,1694761200"; d="scan'208";a="11525425" X-Received: from mdkinney-mobl.amr.corp.intel.com ([10.212.164.220]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Nov 2023 09:04:08 -0800 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Rebecca Cran , Liming Gao , Bob Feng , Yuwei Chen , Leif Lindholm Subject: [edk2-devel] [edk2-stable202311][Patch v2 2/4] BaseTools/Scripts/GetMaintainer: Handle reviewer only case Date: Fri, 10 Nov 2023 09:04:01 -0800 Message-Id: <20231110170403.1068-3-michael.d.kinney@intel.com> In-Reply-To: <20231110170403.1068-1-michael.d.kinney@intel.com> References: <20231110170403.1068-1-michael.d.kinney@intel.com> MIME-Version: 1.0 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,michael.d.kinney@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: EmqMUJq5JiIOX0c9LRkZyIGdx1787277AA= Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1699635854128100013 Content-Type: text/plain; charset="utf-8" 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 | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/BaseTools/Scripts/GetMaintainer.py b/BaseTools/Scripts/GetMain= tainer.py index 2a3147c059b5..081460451e9b 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,17 +103,20 @@ def get_section_maintainers(path, section): else: lists +=3D [address] =20 - return maintainers, lists + return maintainers, reviewers, lists =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: - tmp_maint, tmp_lists =3D get_section_maintainers(path, section) + tmp_maint, tmp_review, tmp_lists =3D get_section_maintainers(path,= section) if tmp_maint: maintainers +=3D tmp_maint + if tmp_review: + reviewers +=3D tmp_review if tmp_lists: lists +=3D tmp_lists =20 @@ -115,13 +125,15 @@ def get_maintainers(path, sections, level=3D0): # REPO.working_dir/ print('"%s": no maintainers found, looking for default' % path) if level =3D=3D 0: - maintainers =3D get_maintainers('', sections, level= =3Dlevel + 1) + maintainers, tmp_review, tmp_lists =3D get_maintainers('', sections, level=3Dlevel + 1) + reviewers +=3D tmp_review + lists +=3D tmp_lists else: print("No maintainers set for project.") if not maintainers: return None =20 - return maintainers + lists + return maintainers, reviewers, lists =20 def parse_maintainers_line(line): """Parse one line of Maintainers.txt, returning any match group and it= s key.""" @@ -186,9 +198,9 @@ if __name__ =3D=3D '__main__': =20 for file in FILES: print(file) - addresslist =3D get_maintainers(file, SECTIONS) - if addresslist: - ADDRESSES +=3D addresslist + maintainers, reviewers, lists =3D get_maintainers(file, SECTIONS) + if maintainers or reviewers or lists: + ADDRESSES +=3D (maintainers + reviewers + lists) =20 for address in list(OrderedDict.fromkeys(ADDRESSES)): if '<' in address and '>' in address: --=20 2.40.1.windows.1 -=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 (#111046): https://edk2.groups.io/g/devel/message/111046 Mute This Topic: https://groups.io/mt/102510794/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- From nobody Tue May 14 19:28:52 2024 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+111044+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+111044+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1699635852; cv=none; d=zohomail.com; s=zohoarc; b=ZY7793VJ3TZGQOAH2uoD6VInLPQqZSFq0lw4PTNNp9QMaxy/TOoeouFKUHXQtUaG4zwzq0j75B6xR7tRfM085Fj98H7JPKs6l4z7tOREkodcYvhYTISF2Cwm+bg037fWj5t5vtmecpEMK1Rc//QAYKAKIGkiJ/JtIV04Wn3ieCI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699635852; h=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=KUZXww52DQVME64Qkwwit5JB97pZ6HU6s7tw77TkgZw=; b=JEPMmLelG7yefEdyPY83za2gis/p4yCC7Hsdre5hUWKRe3eWnTsEU8dc0DmgHodCtnVWRd1M43XvrUIyfv4KSzluAueblgVFVv+gEZs9klvlescSvuHyt9VuEUK3IsyWKTMTPcee37GevINNW/6ybkoSJH6kAjQVxnYzmSiliNc= 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+111044+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 169963585244137.62760309845544; Fri, 10 Nov 2023 09:04:12 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=8qYBRFNIBfiLhv5JrEeQmjJGAZflLLdktodVX/M4Q9s=; 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; s=20140610; t=1699635851; v=1; b=YlTF7phij0tVfP6znEL8VuOQwouJ9bswPagOFMvr2rWdDksBrgCOq6uiYRQhm+Rj6c4RIGV1 VGMDCFPCR3IEjcuPsUv9B7VTOuiz/MhMBimGMvAZdBSB1/Em0ObeotEYKc6gi/ZRFyfiNStScM5 WmPEt506VOcsv2G4C4Om6Fac= X-Received: by 127.0.0.2 with SMTP id 1WnaYY1788612xp6YRcGlk8s; Fri, 10 Nov 2023 09:04:11 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by mx.groups.io with SMTP id smtpd.web11.33120.1699635848781681059 for ; Fri, 10 Nov 2023 09:04:09 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10890"; a="8858169" X-IronPort-AV: E=Sophos;i="6.03,291,1694761200"; d="scan'208";a="8858169" X-Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Nov 2023 09:04:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.03,291,1694761200"; d="scan'208";a="11525428" X-Received: from mdkinney-mobl.amr.corp.intel.com ([10.212.164.220]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Nov 2023 09:04:09 -0800 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Rebecca Cran , Liming Gao , Bob Feng , Yuwei Chen , Leif Lindholm Subject: [edk2-devel] [edk2-stable202311][Patch v2 3/4] BaseTools/Scripts/GetMaintainer: Simplify logic Date: Fri, 10 Nov 2023 09:04:02 -0800 Message-Id: <20231110170403.1068-4-michael.d.kinney@intel.com> In-Reply-To: <20231110170403.1068-1-michael.d.kinney@intel.com> References: <20231110170403.1068-1-michael.d.kinney@intel.com> MIME-Version: 1.0 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,michael.d.kinney@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: hKFNtPp8qBPznKR4hi516Vt1x1787277AA= Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1699635854099100012 Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4593 get_section_maintainers() either returns a list with valid entries or an empty list. It never returns None. Simplify logic that accumulates maintainers, reviewers, and lists by unconditionally appending lists returned from get_section_maintainers(). 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 | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/BaseTools/Scripts/GetMaintainer.py b/BaseTools/Scripts/GetMain= tainer.py index 081460451e9b..a887962dd1bd 100644 --- a/BaseTools/Scripts/GetMaintainer.py +++ b/BaseTools/Scripts/GetMaintainer.py @@ -113,12 +113,9 @@ def get_maintainers(path, sections, level=3D0): lists =3D [] for section in sections: tmp_maint, tmp_review, tmp_lists =3D get_section_maintainers(path,= section) - if tmp_maint: - maintainers +=3D tmp_maint - if tmp_review: - reviewers +=3D tmp_review - if tmp_lists: - lists +=3D tmp_lists + maintainers +=3D tmp_maint + reviewers +=3D tmp_review + lists +=3D tmp_lists =20 if not maintainers: # If no match found, look for match for (nonexistent) file --=20 2.40.1.windows.1 -=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 (#111044): https://edk2.groups.io/g/devel/message/111044 Mute This Topic: https://groups.io/mt/102510791/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- From nobody Tue May 14 19:28:52 2024 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+111045+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+111045+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1699635852; cv=none; d=zohomail.com; s=zohoarc; b=buJMvRiqqysoV0OIeQ324i/kXiEQDx2ETU0uKGxTG5ZOy4FAMFYJNyBW88noX7ZZ6SO1+hqOI2nCrWudPtHra3sS4MRFQY1+rmQ5vCjvQZQHjbZq1vVwcRpGuK40zGf5RosoLLrrO4eVyWm5Cgtktxaxb0azRhU/glXczem8kVU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699635852; h=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=ccdeLZMar2CdEODL59lWndiQWpLa9XGuB1cW/C+FAx4=; b=OMa1su2q9OzH+2t352a4mUE1sTpMKY2zsrxvkiQuyqztoJyioi7HGhqBmtgiV/+e9NltQGwNZUK2/enjdxW3dKdMiU7E+B6OGR7BF8EeJQPQWQZh9z/so1Vwnrd9sECttVnVkM4Gha+sf5LbOX1GduBMTTWDnuY8wy6h0hxb+wg= 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+111045+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 1699635852834295.6651118466517; Fri, 10 Nov 2023 09:04:12 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=RPTYSjbGUYZz7bJspCCPrX0xWijU2negjZglcvQa+Jc=; 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; s=20140610; t=1699635852; v=1; b=seS8FP4WgKAn4mSrhp4O19iEb4nGwJEqFkSg6twgXcKl5JBrWNkQbKL3m2J4CToIyBHu9t8r n6/MRwb1kRh8E9Dh0p0m6HKwly7H80vCaZWpiRyDiaSPAWOx0ztMPLWRpZXMNAyD5a/XCsBk9Dd Lv+ec3s5QM2ntYH9oUj6PO90= X-Received: by 127.0.0.2 with SMTP id WSNkYY1788612xo7QjxTArVM; Fri, 10 Nov 2023 09:04:12 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by mx.groups.io with SMTP id smtpd.web11.33120.1699635848781681059 for ; Fri, 10 Nov 2023 09:04:09 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10890"; a="8858174" X-IronPort-AV: E=Sophos;i="6.03,291,1694761200"; d="scan'208";a="8858174" X-Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Nov 2023 09:04:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.03,291,1694761200"; d="scan'208";a="11525433" X-Received: from mdkinney-mobl.amr.corp.intel.com ([10.212.164.220]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Nov 2023 09:04:09 -0800 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Rebecca Cran , Liming Gao , Bob Feng , Yuwei Chen , Leif Lindholm Subject: [edk2-devel] [edk2-stable202311][Patch v2 4/4] BaseTools/Scripts/GetMaintainer: Sort output addresses Date: Fri, 10 Nov 2023 09:04:03 -0800 Message-Id: <20231110170403.1068-5-michael.d.kinney@intel.com> In-Reply-To: <20231110170403.1068-1-michael.d.kinney@intel.com> References: <20231110170403.1068-1-michael.d.kinney@intel.com> MIME-Version: 1.0 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,michael.d.kinney@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: pINhluIykO7BT773dkjsfsYtx1787277AA= Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1699635854322100014 Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4593 Sort the list of output addresses alphabetically so this script produces the same output even if the order of patches in a patch series is modified such that that order of files processed by this script changes. Use set() logic instead of OrderedDict to accumulate the list of unique addresses that are sorted alphabetically. 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 | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/BaseTools/Scripts/GetMaintainer.py b/BaseTools/Scripts/GetMain= tainer.py index a887962dd1bd..b33546b10f21 100644 --- a/BaseTools/Scripts/GetMaintainer.py +++ b/BaseTools/Scripts/GetMaintainer.py @@ -191,15 +191,16 @@ if __name__ =3D=3D '__main__': else: FILES =3D get_modified_files(REPO, ARGS) =20 - ADDRESSES =3D [] - + # Accumulate a sorted list of addresses + ADDRESSES =3D set([]) for file in FILES: print(file) maintainers, reviewers, lists =3D get_maintainers(file, SECTIONS) - if maintainers or reviewers or lists: - ADDRESSES +=3D (maintainers + reviewers + lists) + ADDRESSES |=3D set(maintainers + reviewers + lists) + ADDRESSES =3D list(ADDRESSES) + ADDRESSES.sort() =20 - for address in list(OrderedDict.fromkeys(ADDRESSES)): + for address in ADDRESSES: if '<' in address and '>' in address: address =3D address.split('>', 1)[0] + '>' print(' %s' % address) --=20 2.40.1.windows.1 -=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 (#111045): https://edk2.groups.io/g/devel/message/111045 Mute This Topic: https://groups.io/mt/102510793/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-