From nobody Sun Jan 25 12:07:23 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1769180382; cv=none; d=zohomail.com; s=zohoarc; b=Om5UkQISsQIvsrQCaGTThG7I4Wz/00tmZ9wL3qNDSzSigr/sI9h8oAyJrb6QY65cF7fI9wIxwheeSA1I5Y/tOBjJG8kE7s7U9Rr2x0lT9a14iwJMriFu6Nk5ac3TqSw2CxgRfU7OuiXpGWfMPlEMiwFhHVP45tQWzZaLN9prQIo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769180382; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=YOI5elt6Aar3cBSUkuqN78QLlyhofCVDFs+1c8kJcJA=; b=XBZJqpdzlvtXfNKZSxf9xlcsS9lSyHqN0iSfneap++1O94DMA6cej8/T9dD9b7G5WDU2/HRMhKfV9MJJnR/6EKY0VCbgAlYILnXj79EwGrFGgBTSmApyEoBckL5q/puBB3g3XDTBBtuQNzYf7yH50kaZPr9T9nnFYRvIURltuWE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1769180382275384.3460910666345; Fri, 23 Jan 2026 06:59:42 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vjIc0-0004I1-8Q; Fri, 23 Jan 2026 09:58:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vjIbv-0004FT-EV for qemu-devel@nongnu.org; Fri, 23 Jan 2026 09:58:07 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vjIbs-0007mm-Ir for qemu-devel@nongnu.org; Fri, 23 Jan 2026 09:58:06 -0500 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-42fbc544b09so1781152f8f.1 for ; Fri, 23 Jan 2026 06:58:04 -0800 (PST) Received: from draig.lan ([185.126.160.19]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-435b1c02f71sm7717001f8f.6.2026.01.23.06.57.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jan 2026 06:57:57 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 8006E5F9F4; Fri, 23 Jan 2026 14:57:51 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769180283; x=1769785083; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YOI5elt6Aar3cBSUkuqN78QLlyhofCVDFs+1c8kJcJA=; b=LtPbl06RpP/qrRzduZdMZuiKiMPtaMUZEm9NkoQuxAMo5ViuQOJOfl9OsgFlkCt+If 8VVVHTjjcwY8dltk10rUCBu+W1qmPmffT4dJwk6GxjR3XkLe2erLfwzp56wKqhGlj6nZ aHSCg3+L96aYPB2E7s9uIuc2krsW9km0O+4tVEHhi3oDJ1NDeZF8yG4K+FpuC8K4b+gn 1b0DvbJ1tLcaD19j4O4zNadD6KzzDQgTX9pm9HdoL9OA00oSc1Km45JuBS7x3kf5/FNX jlZkO3qwimPRBLlKmfuDBLugftLC+0TiGRT7Kk68Wqg0TncjTCOi9/RUh3wpOLzDOyYd VmZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769180283; x=1769785083; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=YOI5elt6Aar3cBSUkuqN78QLlyhofCVDFs+1c8kJcJA=; b=M9BxMkLVxWyiajyXO/x6EZJOyFbOs4jurpBOCXk6zNfzT2JehwySsFf7iMQsK7AVhP bxUKFWdGB/pKRALgb6Q+cLd/mA8KS5b090qkn4+5bKCGQPVp2A/4INxBX77u85Aro8Dx IOTPXE/cWNgVKI8fe2tQCRFqGrvk3Vy+SQSdc873Dq5NVCShInxQYZcQgTjgn3OSvxnu SrBqaQL0VNyy6hiouZsNtA+g4VXLvgB79lU09NZhi9h2fS4DjyrU5bolAWZCIoPLXnlu 7dqbdHjRZrQ6piocqbHxvQAaepKmtITFY8bMXEWLWMgnVMQ1i6OWVCi8qYvxDP0q1Fau SnnQ== X-Gm-Message-State: AOJu0YwLiKD934K1cFJ95peG/F7d7JanBYT+/u/83MG/u/o42LCw1Mvc sYmh+rz+gQ1RASWZgCH/OS8fx0g3NXF8m0QEN+F5GP9kmqFQdYjM1OjiEJxS1GRUIsg= X-Gm-Gg: AZuq6aJLN689kKt0AVbvo7d0b5UGvzLZkimVz6GZbw7Qe75luAq5bmn9NgOY0II4OJg lWHd6PME1Sp4W4hRysogJcwnKJf9yA2wkowwDyCTDUbENFinCYrCD/4X3EiYnDcmXZQ026eQpmK Uwn4P9bdTl6hkQtaXOxDI2b2eFiURwuz6NCV38Bo1WlfCQto6dZCNqBGymEMktPyFzR1CqBoKFo p1aJGj5iEHDiHM84h7vf5dyjE2UKJxoHJgH2/8J1fMomoEuXFQNN0GtPtZADomeiIjp22Hk04M+ HafU9Iy+1/InR5N5JAlI8XW5+4qsC0DtIpJ28yFkgeFZptNcA/+FiQdCtUpQaJfHjfoCYOuaGLN 5cmnCtHK96FMLGt0cRMP2pN5jIGA4gkvtilemqxFiYGSfcWOSgNV4Jlvcrj26MKOr4wYPbKSSlC JNZP2aIYkso1j/ X-Received: by 2002:a05:6000:26ce:b0:42f:ba58:6599 with SMTP id ffacd0b85a97d-435b15f7ef8mr5277780f8f.35.1769180283065; Fri, 23 Jan 2026 06:58:03 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Cleber Rosa , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Mauro Carvalho Chehab , Joe Perches , John Snow Subject: [RFC PATCH v2 12/16] scripts/get_maintainer.py: add support for -f Date: Fri, 23 Jan 2026 14:57:45 +0000 Message-ID: <20260123145750.1200879-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260123145750.1200879-1-alex.bennee@linaro.org> References: <20260123145750.1200879-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x434.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1769180383699154100 Now we have our sections we can add support for checking each file against the maintainer list and gathering the ones we want. Finally we can print the list out. Signed-off-by: Alex Benn=C3=A9e --- scripts/get_maintainer.py | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/scripts/get_maintainer.py b/scripts/get_maintainer.py index 696a5b55d8d..96875255b11 100755 --- a/scripts/get_maintainer.py +++ b/scripts/get_maintainer.py @@ -132,6 +132,32 @@ def __init__(self, section, entries): else: raise UnhandledTag(f"'{tag}' is not understood.") =20 + def __str__(self) -> str: + entries =3D [] + + for m in self.maintainers: + entries.append(f"{m.name} <{m.email}> (maintainer: {self.secti= on})") + + for r in self.reviewers: + entries.append(f"{r.name} <{r.email}> (reviewer: {self.section= })") + + for l in self.lists: + entries.append(f"{l} (open list: {self.section})") + + return "\n".join(entries) + + def is_file_covered(self, filename): + "Is filename covered by this maintainer section" + + for fx in self.files_exclude: + if filename.match(fx): + return False + + for f in self.files: + if filename.match(f): + return True + + return False =20 =20 def read_maintainers(src): @@ -279,6 +305,15 @@ def main(): print(f"loaded {len(maint_sections)} from MAINTAINERS") exit(0) =20 + relevent_maintainers =3D None + + if args.file: + relevent_maintainers =3D [ms for ms in maint_sections if + ms.is_file_covered(args.file)] + + for rm in relevent_maintainers: + print(rm) + =20 if __name__ =3D=3D '__main__': main() --=20 2.47.3