From patchwork Sun Jan 4 20:08:36 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1266 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767557369; bh=fqtPAclD8yfGnzp09zq73l7vfXHdOyQrRtBvJPkreUQ=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=EU0ZAUDoi0nKi2DrnijkGXFEMFwovSfx6pljY13r7MmeDsipEQIIH0eFuPVr+fAhF EzlJ6KDatE5q2BjLwNlTPnIFM/7Iynwoqj+3VfGF5OkF4y5D7w4QJNRfNzwiyVXWIc Tc9WJY/YOZb3juQck18QyIb1a4ogtx54DTKks9GW0IIZ9taWCsEnfHH95fCZOje8ZH uBp9z3m644QldvvX8DovzfIRHBNds+NfI/HwyKRT0N2xUGWYkND/89wmUWCnlJtjSp ADrvMkziXSfl9rwlzaTFC00hgJr0TB6m5TrgTG/dgiMyJ/+QeSx2IEztGhlFKV6CSo 16gNkb6nqapHA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 40E68690DE for ; Sun, 4 Jan 2026 13:09:29 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id kPgO7Z8qNQVI for ; Sun, 4 Jan 2026 13:09:29 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767557369; bh=fqtPAclD8yfGnzp09zq73l7vfXHdOyQrRtBvJPkreUQ=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=EU0ZAUDoi0nKi2DrnijkGXFEMFwovSfx6pljY13r7MmeDsipEQIIH0eFuPVr+fAhF EzlJ6KDatE5q2BjLwNlTPnIFM/7Iynwoqj+3VfGF5OkF4y5D7w4QJNRfNzwiyVXWIc Tc9WJY/YOZb3juQck18QyIb1a4ogtx54DTKks9GW0IIZ9taWCsEnfHH95fCZOje8ZH uBp9z3m644QldvvX8DovzfIRHBNds+NfI/HwyKRT0N2xUGWYkND/89wmUWCnlJtjSp ADrvMkziXSfl9rwlzaTFC00hgJr0TB6m5TrgTG/dgiMyJ/+QeSx2IEztGhlFKV6CSo 16gNkb6nqapHA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 31457690BD for ; Sun, 4 Jan 2026 13:09:29 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767557367; bh=1u0utH2aLwGsQv5ytVnr29n6Q4BFlrxmPW92Y3qHp+M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=phKD9xaJyfLuge2Z4xav5KwN0cQzpKXJ4DeuvnjyLpoQlqPzPFfYmhUgMBRdcT8i6 cBnT1YPcTjVdwexs8LeVUC1VL5GJontayg2Z5LGoZpdvP1XZ9yb3qI5wHJRMavqlPP rP1vAj+I/AFHSKLQHBo+NUMzaVwtsQfLS5SBu0I7XCHF/d3tKfLP+E3sbu8Bd/hq8G 8kPqzSO2gos6MkJoL6ge2qUJl6lucggNRQkup1v2oLunTySEStGs4JbtB9tHDqCoyS 44lH2W/DATe3FnC2ENSQXdGJKTS6357H5hwovCTHohdhiY5+vlVHhTuH+MNPQuhpMJ qR/MIBbGayMAw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 2FDC4690D9; Sun, 4 Jan 2026 13:09:27 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id huSdBF4pYv5C; Sun, 4 Jan 2026 13:09:27 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767557363; bh=/B6Hm+5sk54sRzwE/IyQVMf+CVtl+qMM7+hD9CxCz40=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WKottM44WiBX6WM22WkTHxYisxieXk9LCrbOdXfDQHkTO8DdO/4/QRxCozdd691sF 3al62I7/NlQzWKy3Lud/wnaNjqOg0V0a18okDLM5R7/ZDzQhyIqdJ758SQdLhXmNCV bGZn5x/0dt+Msvm+YvhRGBj4run4hypgfsF9JFlPIvz/W2P7i+QDK4U/80pE2s1SON i/BP60ibrMhcY8I4b/qqzNYss+0ij3ikee1HJ2hZDH70Zn6HNUj2AzPuyBezmleEnJ cYdM/gQzMD6l5D0GdLXBGuLj7BzWZYo+3GAjbLaxnlDwP+frir17mWwh9OoJKFhe8c F0qS1jEbrmNRA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id EEB5569003; Sun, 4 Jan 2026 13:09:22 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Sun, 4 Jan 2026 13:08:36 -0700 Message-ID: <20260104200844.481633-8-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260104200844.481633-1-sjg@u-boot.org> References: <20260104200844.481633-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: SQA3U7GWK2K7TTLSUEX5WFGA7APYHEVF X-Message-ID-Hash: SQA3U7GWK2K7TTLSUEX5WFGA7APYHEVF X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Heinrich Schuchardt , Simon Glass , Claude X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 07/11] buildman: Make MyHTMLParser.re_arch private List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass The re_arch member is only used internally by handle_starttag(), so rename it to _re_arch to indicate it's private. Co-developed-by: Claude Signed-off-by: Simon Glass --- tools/buildman/toolchain.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tools/buildman/toolchain.py b/tools/buildman/toolchain.py index 07adadffaaa..68fea72bf6c 100644 --- a/tools/buildman/toolchain.py +++ b/tools/buildman/toolchain.py @@ -22,7 +22,13 @@ from u_boot_pylib import tools (VAR_CROSS_COMPILE, VAR_PATH, VAR_ARCH, VAR_MAKE_ARGS) = range(4) class MyHTMLParser(HTMLParser): - """Simple class to collect links from a page""" + """Simple class to collect links from a page + + Public members: + arch_link (str): URL of the toolchain for the desired architecture, + or None if not found + links (list of str): List of URLs for all .xz archives found + """ def __init__(self, arch): """Create a new parser @@ -37,7 +43,7 @@ class MyHTMLParser(HTMLParser): HTMLParser.__init__(self) self.arch_link = None self.links = [] - self.re_arch = re.compile('[-_]%s-' % arch) + self._re_arch = re.compile('[-_]%s-' % arch) def handle_starttag(self, tag, attrs): """Handle a start tag in the HTML being parsed""" @@ -46,7 +52,7 @@ class MyHTMLParser(HTMLParser): if tag == 'href': if value and value.endswith('.xz'): self.links.append(value) - if self.re_arch.search(value): + if self._re_arch.search(value): self.arch_link = value