From e72d641a9988976ca9144ca3fd8f9a9988d3bdc5 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 24 Jan 2025 15:57:21 +0000 Subject: [PATCH] bitbake: cooker/cache: Drop mc 'default' string value The string value "default" for the default multiconfig is confusing since an empty string is used pretty much everywhere in the code. Remove the few remaining references to that to standarise. This affects the default value of BB_CURRENT_MC and does have an impact on metadata, particulalry bitbake.conf in openembedded-core. That said, the number of bugs we'll avoid by trying to make "default" back to "" within bitbake's code make fixing those extremely worthwhile. (Bitbake rev: 0fa0d8d764bbeb8a44c47f79d7b849068d565199) Signed-off-by: Richard Purdie --- bitbake/lib/bb/cache.py | 2 +- bitbake/lib/bb/cookerdata.py | 2 +- bitbake/lib/bb/tests/runqueue-tests/classes/base.bbclass | 2 +- bitbake/lib/bb/ui/uihelper.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py index ec7b023fc7..2361c5684d 100644 --- a/bitbake/lib/bb/cache.py +++ b/bitbake/lib/bb/cache.py @@ -395,7 +395,7 @@ class Cache(object): # It will be used later for deciding whether we # need extra cache file dump/load support self.mc = mc - self.logger = PrefixLoggerAdapter("Cache: %s: " % (mc if mc else "default"), logger) + self.logger = PrefixLoggerAdapter("Cache: %s: " % (mc if mc else ''), logger) self.caches_array = caches_array self.cachedir = self.data.getVar("CACHE") self.clean = set() diff --git a/bitbake/lib/bb/cookerdata.py b/bitbake/lib/bb/cookerdata.py index 1f447d30c2..65c153a5bb 100644 --- a/bitbake/lib/bb/cookerdata.py +++ b/bitbake/lib/bb/cookerdata.py @@ -346,7 +346,7 @@ class CookerDataBuilder(object): def _findLayerConf(self, data): return findConfigFile("bblayers.conf", data) - def parseConfigurationFiles(self, prefiles, postfiles, mc = "default"): + def parseConfigurationFiles(self, prefiles, postfiles, mc = ""): data = bb.data.createCopy(self.basedata) data.setVar("BB_CURRENT_MC", mc) diff --git a/bitbake/lib/bb/tests/runqueue-tests/classes/base.bbclass b/bitbake/lib/bb/tests/runqueue-tests/classes/base.bbclass index b57650d591..80b003b2b5 100644 --- a/bitbake/lib/bb/tests/runqueue-tests/classes/base.bbclass +++ b/bitbake/lib/bb/tests/runqueue-tests/classes/base.bbclass @@ -9,7 +9,7 @@ def stamptask(d): with open(stampname, "a+") as f: f.write(d.getVar("BB_UNIHASH") + "\n") - if d.getVar("BB_CURRENT_MC") != "default": + if d.getVar("BB_CURRENT_MC") != "": thistask = d.expand("${BB_CURRENT_MC}:${PN}:${BB_CURRENTTASK}") if thistask in d.getVar("SLOWTASKS").split(): bb.note("Slowing task %s" % thistask) diff --git a/bitbake/lib/bb/ui/uihelper.py b/bitbake/lib/bb/ui/uihelper.py index 82913e0da8..e6983bd559 100644 --- a/bitbake/lib/bb/ui/uihelper.py +++ b/bitbake/lib/bb/ui/uihelper.py @@ -31,7 +31,7 @@ class BBUIHelper: if isinstance(event, bb.build.TaskStarted): tid = event._fn + ":" + event._task - if event._mc != "default": + if event._mc != "": self.running_tasks[tid] = { 'title' : "mc:%s:%s %s" % (event._mc, event._package, event._task), 'starttime' : time.time(), 'pid' : event.pid } else: self.running_tasks[tid] = { 'title' : "%s %s" % (event._package, event._task), 'starttime' : time.time(), 'pid' : event.pid }