From patchwork Mon Oct 5 06:53:21 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Kiernan X-Patchwork-Id: 99971 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 59984CA5FE2 for ; Mon, 5 Oct 2026 06:54:02 +0000 (UTC) Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.14290.1791183235954390028 for ; Sun, 04 Oct 2026 23:53:56 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20251104 header.b=o1TlWRUE; spf=pass (domain: gmail.com, ip: 209.85.221.44, mailfrom: alex.kiernan@gmail.com) Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-486e70f2457so539898f8f.2 for ; Sun, 04 Oct 2026 23:53:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1791183234; x=1791788034; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=7UHRM2AUGTIS8ptPnW10/2NIvTgnc+FhcBnHwsCp4zQ=; b=o1TlWRUEX0q3foEFoeaBsbrjaDa1lexAgbSRgbhXnyjKaKbVDR80x8QVlubCuDDVrw zuZzFbtnKSCqHlkGLwuHKk9LkT1H6F9LWtKE35N5KXUbnhHWaK7vVMdtUarnQQ6sjQPF YP/DQw6t3MFmCml9qTRH0Dntk54JsgHWSANMokE2yWw+Pd1eyqBvipXQrPBhZhkLgQwZ pk52/3w5iRBiiUVbXr8fI5XQ+aD+HqERJgUhIIAGbWH9WMOm5zuwysIpIH9Y+9qJIpIM 7VSuktbdB2w7dfOOo8lkWbL5wB9zYlLjAgIcgMLqaXgMfHA+X0Y1uYRGRR5baKk3yyos aI+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1791183234; x=1791788034; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=7UHRM2AUGTIS8ptPnW10/2NIvTgnc+FhcBnHwsCp4zQ=; b=irHfQH3vIL+0fDYPsvRSDN/G+uUOfAAC21f7gAnDQVHh+Dc+FYrJH2v4g4AaLsqp0v 9M1rwqtl8f6UiE0BRNOrGpOX7jYcnqVloe0VKFF9ACe+ibJjDtEYgoBQxFYD38KlJmJw psyMCHvPHd1ibnP8fMLPIo2Lw5ZPML0yqbDtzpU2RRiLXy/wIwnd1c0j8Hr3Raqp0p9y cSu/KR8C/yydNIlDpTVA8t5s0cvw/sUVLgGXObmgoTBEmQ0ljpiWjILGGIlxnXSIqd+1 7qL4M0F6aVKoqjrjqvxC5luhdmmayENhiKjJWo04d+ltFuw+57+TWG0vFnpr+RjuhCK+ pisg== X-Gm-Message-State: AFq9FYLtmkUC5PAqO5UIxoadyHRr3jjVCBgqvom86VllAi0JUcKRE6wp LbNQkQwfCz8NlMzd9qYEeCr031kdg/xXNZuwt3nTVZs6LUXrWesS+zCYxxD3Gw== X-Gm-Gg: AYBFou3v3bhNI4lmKqjFM9e4TE3dpxPGsggriM0E5eskw9wWYQdekSSc5HGYKG4haJ8 kdrLojdoM5Zo9t2uKJdMBQTXx9NJiu3NQRYQ7N34zh59DqxfJ6W21b6bs8xpSe/mIALqzWjr8pM mzn8sSzFoPPoQh8zMGfys5BoSyvb3Jna8YQNW06RQgr66qHA1Sw0n6W2EAmpRErp8yYTBG010nJ vGZ9yVlkto4dnjtL+KKixWIFmg7KViihaSmCwugpyDVCUsEx0mkk8ou1kcj5WAVh78Acz2GNb/5 NFHpgeteog5ST20Kp8Ygssbi1IbBsSQucQeyR5YJe3xfvwInPxSbc0xmipglEwo5ktWMiIQrQbX z8YOkjuU0TBHdpakxCvmcmeF+4+YmjbizDnIthjvlpisbl+klC+IduPzLMftQN2S7bVzPWk2Edi BP5M6Pt4lANtq061fAKxD6AiXOpAyDI/hqxfJoLD9SPwqr8BN7nTC097Fr7P9g0GYIorHMMcNCo RAmHNVqGJp6TRZhckkI5vxLlNHNNMUavFU1a0y948SaELcesziofhGLpZJC X-Received: by 2002:a05:6000:98f:b0:48b:116d:56fb with SMTP id ffacd0b85a97d-48c47c66e18mr10015464f8f.1.1791183234028; Sun, 04 Oct 2026 23:53:54 -0700 (PDT) Received: from localhost.localdomain (cust18-dsl93-89-130.idnet.net. [93.89.130.18]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48c622b4685sm1487592f8f.41.2026.10.04.23.53.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Oct 2026 23:53:53 -0700 (PDT) From: Alex Kiernan To: openembedded-core@lists.openembedded.org Cc: Alex Kiernan Subject: [PATCH 1/3] sstate-cache-management: find work-shared stamps too Date: Mon, 5 Oct 2026 07:53:21 +0100 Message-ID: <20261005065322.30522-2-alex.kiernan@gmail.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 05 Oct 2026 06:54:02 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/247217 remove_by_stamps() collects the hashes still in use by globbing the stamps directory at a fixed depth, "*/*/*.do_*", matching //; the fixed depth is deliberate, so that the walk does not stat() the whole tree, which over NFS costs a round trip per entry. But the shared-source recipes - gcc-source, llvm-project-source and rust-source - set STAMP to ${STAMPS_DIR}/work-shared/--, one level shallower, so their hashes are never collected and --stamps-dir plans their sstate objects for removal while a build still uses them. (externalsrc's work-shared// is at the usual depth and was already found.) Glob that layout too, at its own fixed depth, rather than recursively. Against a cache shared by eight build directories, the stock script planned 740 of 91486 files for removal; 43 of them, all gcc-source, llvm-project-source and rust-source objects, had hashes in live work-shared stamps. With this change it plans 697, the same list as a recursive "**" glob produces. Filesystem calls during the run (strace): 353084 before, 353196 after, against 377568 for the recursive glob. The shell script this replaced used "find $stamps -maxdepth 3", which did include them. Fixes: 2fa1b25d7485 ("sstate-cache-management: Rewrite in python") AI-Generated: Claude Opus 5.5 Signed-off-by: Alex Kiernan --- scripts/sstate-cache-management.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/scripts/sstate-cache-management.py b/scripts/sstate-cache-management.py index f5737004c544..d088878a92df 100755 --- a/scripts/sstate-cache-management.py +++ b/scripts/sstate-cache-management.py @@ -142,6 +142,15 @@ def collect_sstate_paths(args): return paths +# Where stamps live under STAMPS_DIR, each at a fixed depth: globbing those +# depths exactly, rather than recursively, keeps the walk from stat()ing +# everything in the tree, which over NFS is slow with a round trip per entry. +STAMP_LAYOUTS = ( + "*/*/", # //... (bitbake.conf); also externalsrc's work-shared// + "work-shared/", # work-shared/--... (gcc-source, llvm-project-source, rust-source) +) + + def remove_by_stamps(args, paths): all_sums = set() for stamps_dir in args.stamps_dir: @@ -151,14 +160,16 @@ def remove_by_stamps(args, paths): all_sums |= set( [ re_sigdata.search(x.parts[-1]).group(1) - for x in stamps_path.glob("*/*/*.do_*.sigdata.*") + for layout in STAMP_LAYOUTS + for x in stamps_path.glob(layout + "*.do_*.sigdata.*") ] ) re_setscene = re.compile(r"do_.*_setscene\.([^.]*)") all_sums |= set( [ re_setscene.search(x.parts[-1]).group(1) - for x in stamps_path.glob("*/*/*.do_*_setscene.*") + for layout in STAMP_LAYOUTS + for x in stamps_path.glob(layout + "*.do_*_setscene.*") ] ) return [p for p in paths if p.bb_unihash not in all_sums] From patchwork Mon Oct 5 06:53:23 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Kiernan X-Patchwork-Id: 99972 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 383A0CA5FE2 for ; Mon, 5 Oct 2026 06:54:12 +0000 (UTC) Received: from mail-wr2-f12.google.com (mail-wr2-f12.google.com [74.125.225.76]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.14296.1791183248505834615 for ; Sun, 04 Oct 2026 23:54:08 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20251104 header.b=GiJqL+ZJ; spf=pass (domain: gmail.com, ip: 74.125.225.76, mailfrom: alex.kiernan@gmail.com) Received: by mail-wr2-f12.google.com with SMTP id ffacd0b85a97d-482f6351831so593076f8f.1 for ; Sun, 04 Oct 2026 23:54:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1791183247; x=1791788047; darn=lists.openembedded.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:content-type; bh=jRTp854LI7P4KaAUIS//15uOsW1VfnFB8uAFVSx2Pjc=; b=GiJqL+ZJfgFpfYqXqMmbDW+mlLRmVJTWkfTniOBsRjScJlfysZ2d7cQHandbNEdvz/ /Rg+tgiyHxVugY/hoaPDulwJVUVHEf1qgf7M0JBXPMeraXnWdlQRhqNMLDGbkZ6481Ko IN/3QqMCXc2gOBvwm2ZIcSgXxg7PGME+oqII1Z96dKPmfrPuene+mIT0aHqOovFFFMSZ ECo5uxtxBrwmY4vgytKbvGcARsoheADQBhLaDcJigsTWozGIUSf1cBjr+2WjDGBVetHy RQg8NB4msKk0h3fdv6PIg5G3eWjQckmrgQNceUMb/dSi1xkHO02+g30bJw07+VwbkLIo LwQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1791183247; x=1791788047; 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:content-type; bh=jRTp854LI7P4KaAUIS//15uOsW1VfnFB8uAFVSx2Pjc=; b=wnthQrzu2boDmyDkl1vTFnjyq5vY3cXJGUjqikB5ur0d0whjy4S9ci9mjj9Vauh/f3 1T48j9jS15IvSxuZ9gY2Wce1UnXKlinlJKHMQ3T84+rVJ000elw6kfTKWiSizv/IRFRX JZRWhspQ0t3AW3aiLH1877y/WKukZiZogS5mdrk9Bi1Pn0KjO7EZVHG5kEPfyDlmlsTQ XAb6KJii6fZ8ipI3lUJ5OC0rckDE2F7bZ3+oARbdIap74S9617imPk7/EZkW71Z2eMAf tZEtnROgqj7ZNCBEWl8h0WP8A5Mj9UVkc5QIUWItnnPmNKBPoEZxQVXA6Bfzr9js/7mS clyg== X-Gm-Message-State: AFq9FYKu+4CfoqaxLft2K+glkzTz3HL6tCVqQ4vn7PeDRH2edEzt8k+s pN/F+2y/OSVV84FyVqHaf7y9vthP5reQALyxkXSddMCkINj8oOf/6bfwu+Arnw== X-Gm-Gg: AYBFou3ijXdi3jirTL7FBgdPfjnRcUY5iHNALS5yzZ2ZQ7F+2FJlvJ4BrPZKJTbEE6U 3JALRSHUe6tx88OXAxnPtfSlpQlccoWCrq3qoidU3iaoqDN9JNFPnO68vsqAlOzH/lzMkGgiZ85 /0JMQ16+vTy3/HiPasYIzOsvCkJl/QmkJEbizi7DtftGFmvqek1FT4DJe+koYzuiK+j3GENmTra nLvnd6revcwYir3Y9Q1wJHsM3nThhsaEtnKu7io8MeAyqvOZiVD3DOcpgOsosn14dJJiHZSdbPj YUtXmrFCGh4JG/4eUPCfeWZ07RGAoHHThRhb8fsjqysK2GGF4HCIIFQBkfNiI4Nds0bwyWLkDEj 6QIbvznp+ZJW+Z4Y+rZvjmr9TTvqGr/rnwtVGwvhHd5vPQ2J8lqiqugcdnm4ZxEXDvSByIzzHQX ejv/XxmQMxNfX9YI/TP7ss7sk2wkN5mvLte0Us5pLdjUAj+HM4om79UJtX4nJBOZ5kgQYYV8mXz VcKtJJ3/ocuRJ+WR4JFRWTK18qoJAryAnXzpG5F1H47XD/U6qPX+U9IYss= X-Received: by 2002:a05:6000:4025:b0:488:7787:469d with SMTP id ffacd0b85a97d-48b1271790cmr17286856f8f.25.1791183246679; Sun, 04 Oct 2026 23:54:06 -0700 (PDT) Received: from localhost.localdomain (cust18-dsl93-89-130.idnet.net. [93.89.130.18]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48c622b4685sm1487592f8f.41.2026.10.04.23.54.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Oct 2026 23:54:06 -0700 (PDT) From: Alex Kiernan To: openembedded-core@lists.openembedded.org Cc: Alex Kiernan Subject: [PATCH 2/3] sstate-cache-management: skip directories it cannot read Date: Mon, 5 Oct 2026 07:53:23 +0100 Message-ID: <20261005065322.30522-4-alex.kiernan@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261005065322.30522-2-alex.kiernan@gmail.com> References: <20261005065322.30522-2-alex.kiernan@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 05 Oct 2026 06:54:12 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/247218 collect_sstate_paths() walks the cache assuming every entry is a directory, and only tolerates NotADirectoryError. A directory the user cannot read raises PermissionError instead, which aborts the whole run with a traceback. The usual one is lost+found, whenever SSTATE_DIR is the root of a filesystem - a dedicated disk, a volume, an NFS export - and the script is run as the build user rather than root. Warn on stderr and carry on, as find did in the shell script this replaced. stderr keeps the warning out of the list -D prints. Run as a non-root user against a cache at the root of an ext4 filesystem: before, PermissionError on lost+found and exit 1; after, "Skipping .../lost+found: Permission denied" and a complete run. Fixes: 2fa1b25d7485 ("sstate-cache-management: Rewrite in python") AI-Generated: Claude Opus 5.5 Signed-off-by: Alex Kiernan --- scripts/sstate-cache-management.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/sstate-cache-management.py b/scripts/sstate-cache-management.py index d088878a92df..c361c3d5a07f 100755 --- a/scripts/sstate-cache-management.py +++ b/scripts/sstate-cache-management.py @@ -125,6 +125,9 @@ def collect_sstate_paths(args): except NotADirectoryError: pass + except PermissionError as e: + # e.g. lost+found when the cache is the root of a filesystem + print(f"Skipping {path}: {e.strerror}", file=sys.stderr) paths = set() # TODO: parellise scandir From patchwork Mon Oct 5 06:53:25 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Kiernan X-Patchwork-Id: 99973 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3A425CA5FCE for ; Mon, 5 Oct 2026 06:54:22 +0000 (UTC) Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.14298.1791183257385111840 for ; Sun, 04 Oct 2026 23:54:17 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20251104 header.b=owQAb/+J; spf=pass (domain: gmail.com, ip: 209.85.221.51, mailfrom: alex.kiernan@gmail.com) Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-48afcfc4bf5so1072166f8f.1 for ; Sun, 04 Oct 2026 23:54:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1791183256; x=1791788056; darn=lists.openembedded.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:content-type; bh=u3gccItvNWzO5JNQBdwXVSFGHQoDqY4ZeNMrUIYhewA=; b=owQAb/+JIzwEaJp+QK/rVJnJD+oIa5Ca6ZAdguRmlWSErnMujUg3iravtiVhDrCWIP Ut4Hfq1pJzAXhP3Fy+knbVe4er3dmQ/Fkpjip3ejGENfM2KqiNQvWZHtQRFb/VDhHxYV SESEyOu7aAYcbgoRBdu44ERQaA0kpB5mj4AudQCdGVvuZnPVs9/LRbnOcgVAE1meAw9w q3UCuFgrbXwAe3mPu6gZnSXDTGUjwUFXyxTN1FBbKwejrjpWS0aYjign5XaqagjSxc2j ukPCO4pm0arBVagGO+714KoSL4ECozB65f13VOxnnC+STpRqcq+U5DFhWhXwOFFtYLoG k9lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1791183256; x=1791788056; 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:content-type; bh=u3gccItvNWzO5JNQBdwXVSFGHQoDqY4ZeNMrUIYhewA=; b=W0eV8zetJd64nZ6dFwNnSDzq7Uyk0425TvzY6tDdm+My+Ysi6kTHPbY5sSSjgQLCyF 0LT4JNJrZONmUjHoHUFrw9WirJFEkf3F90ZXsstwE/9Bdw0KM4FZ4HYoJUBwM7EFAEtd 0DHz2/aIMTMr33qfv8Hb5oJ0jI9qK6l+7OAPoWQzRmInVrsfw2y+WZm8uobMTVSrw+8D reG2wuTJE7F51qXjKGK/8jDmM1vqysrKtXNQZNtoxTwg0jdbOjxLI94z3/ESLhE75Hq/ vcRZnMdmNO0DIhVpa2CBpTWU7vAS0IczzZpw48e+KoFCkDRHbpnavxi4Pv82FmYltS4n mHYQ== X-Gm-Message-State: AFq9FYKlsdixR7RZwvf/Yo+sTLny0mE0vAVTOpLcwOIOScmLJKu6M0MN /SMzFGGUYV3wHOQjeisBT3U9txIPuqX+aCWVPJG+BQQ4YzAgQlJ+EqAqzExzWw== X-Gm-Gg: AYBFou3Hpt4LkLg3py2fJJbMK6l+bJ4Ki+E9pNmjlhQOtzNB9RpCgRy8Gyo0GcAMaM/ ZcwdAGVqq/qInlp6vQv6Bd905rQMpFjwUiGbgOT91ET2PQ1z0bXRQQ2JHEvYz3KshU49mNzTv1U xmYcT3lUlSt3QSmRpKKy/xJWo9GCMp5B/YJKojkCSoQR+etPL0pEffoeCj/djR52A/nEpg/v6Kj xfTZehxInRFEO5BL0c6njZqi2iuJT1ZPNRMjtLjvL9RqTIxxh46Rt4q7wmRRIVdDTRcJanys9/D mnACE2UFwMW/GKogDpuZGkylBxO9zW1dOQM+ALDYBXQ1XZBHaKXu8GTCMHnm2IkFPU/lnjYqosl nbDFQb+KkGaOdJK9/5pGtKu7QwN/1pmmGpGUyfrakTIY3d20JZwrm7YnO0cP3OBtpLXs4E5A3DY CHXzWQnCtnEATflHInhZJssKo1YgzkENM77bkx4cSpsm4fLwfHuS+08gesAb3crMOpqRfmaa5qp cZGZ9bAbEwbvKAmuE6FZI28KDBeNtH9cmdcFPR+EOvpUWVC+dwuiv/lHGVQrT+naoWLGA== X-Received: by 2002:a5d:64c8:0:b0:488:8232:d16e with SMTP id ffacd0b85a97d-48c47fff875mr11399958f8f.45.1791183255632; Sun, 04 Oct 2026 23:54:15 -0700 (PDT) Received: from localhost.localdomain (cust18-dsl93-89-130.idnet.net. [93.89.130.18]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48c622b4685sm1487592f8f.41.2026.10.04.23.54.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Oct 2026 23:54:15 -0700 (PDT) From: Alex Kiernan To: openembedded-core@lists.openembedded.org Cc: Alex Kiernan Subject: [PATCH 3/3] sstate-cache-management: drop unused functions Date: Mon, 5 Oct 2026 07:53:25 +0100 Message-ID: <20261005065322.30522-6-alex.kiernan@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261005065322.30522-2-alex.kiernan@gmail.com> References: <20261005065322.30522-2-alex.kiernan@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 05 Oct 2026 06:54:22 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/247219 find_archs() and find_tasks() were implemented when converting from sstate-cache-management.sh; neither have ever been used, so drop them. Signed-off-by: Alex Kiernan --- scripts/sstate-cache-management.py | 44 ------------------------------ 1 file changed, 44 deletions(-) diff --git a/scripts/sstate-cache-management.py b/scripts/sstate-cache-management.py index c361c3d5a07f..e77f0b0efb60 100755 --- a/scripts/sstate-cache-management.py +++ b/scripts/sstate-cache-management.py @@ -63,50 +63,6 @@ class SstateEntry: return self.match.group(name) -# this is what's in the original script; as far as I can tell, it's an -# implementation artefact which we don't need? -def find_archs(): - # all_archs - builder_arch = os.uname().machine - - # FIXME - layer_paths = [Path("../..")] - - tune_archs = set() - re_tune = re.compile(r'AVAILTUNES .*=.*"(.*)"') - for path in layer_paths: - for tunefile in [ - p for p in path.glob("meta*/conf/machine/include/**/*") if p.is_file() - ]: - with open(tunefile) as f: - for line in f: - m = re_tune.match(line) - if m: - tune_archs.update(m.group(1).split()) - - # all_machines - machine_archs = set() - for path in layer_paths: - for machine_file in path.glob("meta*/conf/machine/*.conf"): - machine_archs.add(machine_file.parts[-1][:-5]) - - extra_archs = set() - all_archs = ( - set( - arch.replace("-", "_") - for arch in machine_archs | tune_archs | set(["allarch", builder_arch]) - ) - | extra_archs - ) - - print(all_archs) - - -# again, not needed? -def find_tasks(): - print(set([p.bb_task for p in paths])) - - def collect_sstate_paths(args): def scandir(path, paths): # Assume everything is a directory; by not checking we avoid needing an