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 <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2025-01-24 15:57:21 +00:00
parent faa05c8781
commit e72d641a99
4 changed files with 4 additions and 4 deletions

View File

@ -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()

View File

@ -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)

View File

@ -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)

View File

@ -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 }