From patchwork Mon Nov 30 15:28:35 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 106520 Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.34868.1796052535415720450 for ; Mon, 30 Nov 2026 07:28:55 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=OdxmqziX; spf=pass (domain: linuxfoundation.org, ip: 209.85.221.54, mailfrom: richard.purdie@linuxfoundation.org) Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-4c3f0acc1easo1074548f8f.0 for ; Mon, 30 Nov 2026 07:28:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1796052534; x=1796657334; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=Dg2yX/Ww4GB//Qg+Q15VE5Oog2OUjH9I6GdQk1TX7R4=; b=OdxmqziXpXsI/DnupCG6v135UtE0VpDQKZsV678PmVPe0MjnFYjlw1IelfILxeKBkl ed+jtPBpufEqjY57lTbAm/hk1ILk308MGP2Be5orWQYxuhzFqRnw9UDtdyb7GhGC9rlN blU8aW2CIUQwv1XV2kvFl1tQsfwyGqTZFPyMc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796052534; x=1796657334; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=Dg2yX/Ww4GB//Qg+Q15VE5Oog2OUjH9I6GdQk1TX7R4=; b=r8CU4WQl0SpMj8ADueo56ooKQPoF+9i+HCEZsDyy5NqHsw96BDKeRQRT/NPnf6AOv5 Ru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cDvx5Y4g== X-Received: by 2002:a05:6000:2c05:b0:48e:6651:5956 with SMTP id ffacd0b85a97d-4aa488c85eamr73318703f8f.0.1796052533547; Mon, 30 Nov 2026 07:28:53 -0800 (PST) Return-Path: Received: from max.int.rpsys.net ([2001:8b0:aba:5f3c:2444:81bb:2aff:8d84]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4ab6baa397asm66033172f8f.48.2026.11.30.07.28.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2026 07:28:52 -0800 (PST) From: Richard Purdie To: bitbake-devel@lists.openembedded.org Subject: [PATCH 05/17] cooker/cache/command/tinfoil: Drop bbfile_priority Date: Mon, 30 Nov 2026 15:28:35 +0000 Message-ID: <20261130152847.3472849-5-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261130152847.3472849-1-richard.purdie@linuxfoundation.org> References: <20261130152847.3472849-1-richard.purdie@linuxfoundation.org> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Mon, 30 Nov 2026 15:29:02 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/20494 These are confusing and about to be removed with the layer changes. Prepare the way for that by removing the cached priority values. Remove the command and tinfoil APIs that access it. Signed-off-by: Richard Purdie --- lib/bb/cache.py | 1 - lib/bb/command.py | 18 +----------------- lib/bb/cooker.py | 7 ------- lib/bb/tinfoil.py | 10 ---------- 4 files changed, 1 insertion(+), 35 deletions(-) diff --git a/lib/bb/cache.py b/lib/bb/cache.py index a1d8bfbd8dd..67c3f14ccc1 100644 --- a/lib/bb/cache.py +++ b/lib/bb/cache.py @@ -808,7 +808,6 @@ class CacheData(object): # Indirect Cache variables (set elsewhere) self.ignored_dependencies = [] self.world_target = set() - self.bbfile_priority = {} def add_from_recipeinfo(self, fn, info_array): for info in info_array: diff --git a/lib/bb/command.py b/lib/bb/command.py index f49ebb19d8e..9848b7a6732 100644 --- a/lib/bb/command.py +++ b/lib/bb/command.py @@ -406,14 +406,6 @@ class CommandsSync: return command.cooker.recipecaches[mc].inherits getRecipeInherits.readonly = True - def getBbFilePriority(self, command, params): - try: - mc = params[0] - except IndexError: - mc = '' - return command.cooker.recipecaches[mc].bbfile_priority - getBbFilePriority.readonly = True - def getDefaultPreference(self, command, params): try: mc = params[0] @@ -437,15 +429,7 @@ class CommandsSync: mc = params[0] except IndexError: mc = '' - - # Return list sorted by reverse priority order - import bb.cache - def sortkey(x): - vfn, _ = x - realfn, _, item_mc = bb.cache.virtualfn2realfn(vfn) - return -command.cooker.collections[item_mc].calc_bbfile_priority(realfn)[0], vfn - - skipdict = OrderedDict(sorted(command.cooker.skiplist_by_mc[mc].items(), key=sortkey)) + skipdict = OrderedDict(sorted(command.cooker.skiplist_by_mc[mc].items())) return list(skipdict.items()) getSkippedRecipes.readonly = True diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py index 54f87278fde..7fca4ac2f74 100644 --- a/lib/bb/cooker.py +++ b/lib/bb/cooker.py @@ -1421,7 +1421,6 @@ You can also remove the BB_HASHSERVE_UPSTREAM setting, but this may result in si # Tweak some variables item = info_array[0].pn self.recipecaches[mc].ignored_dependencies = set() - self.recipecaches[mc].bbfile_priority[fn] = 1 self.configuration.limited_deps = True # Remove external dependencies @@ -1702,8 +1701,6 @@ You can also remove the BB_HASHSERVE_UPSTREAM setting, but this may result in si raise bb.BBHandledException() self.show_appends_with_no_recipes() self.handlePrefProviders() - for mc in self.multiconfigs: - self.recipecaches[mc].bbfile_priority = self.collections[mc].collection_priorities(self.recipecaches[mc].pkg_fn, self.parser.mcfilelist[mc], self.data) self.state = State.RUNNING # Send an event listing all stamps reachable after parsing @@ -1875,10 +1872,6 @@ class CookerCollectFiles(object): files = (config.getVar( "BBFILES") or "").split() - # Sort files by priority - files.sort( key=lambda fileitem: self.calc_bbfile_priority(fileitem)[0] ) - config.setVar("BBFILES_PRIORITIZED", " ".join(files)) - if not files: files = self.get_bbfiles() diff --git a/lib/bb/tinfoil.py b/lib/bb/tinfoil.py index 4fd2a9af82e..e37cf88ef37 100644 --- a/lib/bb/tinfoil.py +++ b/lib/bb/tinfoil.py @@ -12,7 +12,6 @@ import os import sys import time import atexit -import re from collections import OrderedDict, defaultdict from functools import partial, wraps from contextlib import contextmanager @@ -300,8 +299,6 @@ class TinfoilCookerAdapter: attrvalue = self.tinfoil.run_command('getRecipeVersions', self.mc) or {} elif name == 'inherits': attrvalue = self.tinfoil.run_command('getRecipeInherits', self.mc) or {} - elif name == 'bbfile_priority': - attrvalue = self.tinfoil.run_command('getBbFilePriority', self.mc) or {} elif name == 'pkg_dp': attrvalue = self.tinfoil.run_command('getDefaultPreference', self.mc) or {} elif name == 'fn_provides': @@ -339,13 +336,6 @@ class TinfoilCookerAdapter: # Grab these only when they are requested since they aren't always used if name in self._cache: return self._cache[name] - elif name == 'bbfile_config_priorities': - ret = self.tinfoil.run_command('getLayerPriorities') - bbfile_config_priorities = [] - for collection, pattern, regex, pri in ret: - bbfile_config_priorities.append((collection, pattern, re.compile(regex), pri)) - - attrvalue = bbfile_config_priorities else: raise AttributeError("%s instance has no attribute '%s'" % (self.__class__.__name__, name))