mirror of
https://git.yoctoproject.org/poky
synced 2026-04-05 08:02:25 +02:00
bitbake: multiconfig: Switch from 'multiconfig' -> 'mc'
After real world use its clear the "multiconfig:" prefix to multiconfig tasks, whilst clear, is also clumbersome. Switch to use the short version instead. mcdepends will continue to work with "multiconfig:" for now as well. The commandline will only accept mc: going forward. [YOCTO #11168] (Bitbake rev: 821daf093b76504067a8b77dfa4b181af6ec92b4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -237,7 +237,7 @@ def virtualfn2realfn(virtualfn):
|
||||
Convert a virtual file name to a real one + the associated subclass keyword
|
||||
"""
|
||||
mc = ""
|
||||
if virtualfn.startswith('multiconfig:'):
|
||||
if virtualfn.startswith('mc:'):
|
||||
elems = virtualfn.split(':')
|
||||
mc = elems[1]
|
||||
virtualfn = ":".join(elems[2:])
|
||||
@@ -258,7 +258,7 @@ def realfn2virtual(realfn, cls, mc):
|
||||
if cls:
|
||||
realfn = "virtual:" + cls + ":" + realfn
|
||||
if mc:
|
||||
realfn = "multiconfig:" + mc + ":" + realfn
|
||||
realfn = "mc:" + mc + ":" + realfn
|
||||
return realfn
|
||||
|
||||
def variant2virtual(realfn, variant):
|
||||
@@ -267,11 +267,11 @@ def variant2virtual(realfn, variant):
|
||||
"""
|
||||
if variant == "":
|
||||
return realfn
|
||||
if variant.startswith("multiconfig:"):
|
||||
if variant.startswith("mc:"):
|
||||
elems = variant.split(":")
|
||||
if elems[2]:
|
||||
return "multiconfig:" + elems[1] + ":virtual:" + ":".join(elems[2:]) + ":" + realfn
|
||||
return "multiconfig:" + elems[1] + ":" + realfn
|
||||
return "mc:" + elems[1] + ":virtual:" + ":".join(elems[2:]) + ":" + realfn
|
||||
return "mc:" + elems[1] + ":" + realfn
|
||||
return "virtual:" + variant + ":" + realfn
|
||||
|
||||
def parse_recipe(bb_data, bbfile, appends, mc=''):
|
||||
@@ -349,7 +349,7 @@ class NoCache(object):
|
||||
bb_data = self.databuilder.mcdata[mc].createCopy()
|
||||
newstores = parse_recipe(bb_data, bbfile, appends, mc)
|
||||
for ns in newstores:
|
||||
datastores["multiconfig:%s:%s" % (mc, ns)] = newstores[ns]
|
||||
datastores["mc:%s:%s" % (mc, ns)] = newstores[ns]
|
||||
|
||||
return datastores
|
||||
|
||||
|
||||
@@ -505,7 +505,7 @@ class BBCooker:
|
||||
self.reset()
|
||||
|
||||
def mc_base(p):
|
||||
if p.startswith('multiconfig:'):
|
||||
if p.startswith('mc:'):
|
||||
s = p.split(':')
|
||||
if len(s) == 2:
|
||||
return s[1]
|
||||
@@ -583,10 +583,10 @@ class BBCooker:
|
||||
wildcard = False
|
||||
|
||||
# Wild card expansion:
|
||||
# Replace string such as "multiconfig:*:bash"
|
||||
# into "multiconfig:A:bash multiconfig:B:bash bash"
|
||||
# Replace string such as "mc:*:bash"
|
||||
# into "mc:A:bash mc:B:bash bash"
|
||||
for k in targetlist:
|
||||
if k.startswith("multiconfig:"):
|
||||
if k.startswith("mc:"):
|
||||
if wildcard:
|
||||
bb.fatal('multiconfig conflict')
|
||||
if k.split(":")[1] == "*":
|
||||
@@ -619,7 +619,7 @@ class BBCooker:
|
||||
runlist = []
|
||||
for k in fulltargetlist:
|
||||
mc = ""
|
||||
if k.startswith("multiconfig:"):
|
||||
if k.startswith("mc:"):
|
||||
mc = k.split(":")[1]
|
||||
k = ":".join(k.split(":")[2:])
|
||||
ktask = task
|
||||
@@ -700,7 +700,7 @@ class BBCooker:
|
||||
@staticmethod
|
||||
def add_mc_prefix(mc, pn):
|
||||
if mc:
|
||||
return "multiconfig:%s:%s" % (mc, pn)
|
||||
return "mc:%s:%s" % (mc, pn)
|
||||
return pn
|
||||
|
||||
def buildDependTree(self, rq, taskdata):
|
||||
@@ -1477,7 +1477,7 @@ class BBCooker:
|
||||
ntargets = []
|
||||
for target in runlist:
|
||||
if target[0]:
|
||||
ntargets.append("multiconfig:%s:%s:%s" % (target[0], target[1], target[2]))
|
||||
ntargets.append("mc:%s:%s:%s" % (target[0], target[1], target[2]))
|
||||
ntargets.append("%s:%s" % (target[1], target[2]))
|
||||
|
||||
for mc in self.multiconfigs:
|
||||
@@ -1607,7 +1607,7 @@ class BBCooker:
|
||||
bb.providers.buildWorldTargetList(self.recipecaches[mc], task)
|
||||
for t in self.recipecaches[mc].world_target:
|
||||
if mc:
|
||||
t = "multiconfig:" + mc + ":" + t
|
||||
t = "mc:" + mc + ":" + t
|
||||
pkgs_to_build.append(t)
|
||||
|
||||
if 'universe' in pkgs_to_build:
|
||||
@@ -1626,7 +1626,7 @@ class BBCooker:
|
||||
bb.debug(1, "Skipping %s for universe tasks as task %s doesn't exist" % (t, task))
|
||||
continue
|
||||
if mc:
|
||||
t = "multiconfig:" + mc + ":" + t
|
||||
t = "mc:" + mc + ":" + t
|
||||
pkgs_to_build.append(t)
|
||||
|
||||
return pkgs_to_build
|
||||
|
||||
@@ -39,7 +39,7 @@ def taskname_from_tid(tid):
|
||||
return tid.rsplit(":", 1)[1]
|
||||
|
||||
def mc_from_tid(tid):
|
||||
if tid.startswith('multiconfig:'):
|
||||
if tid.startswith('mc:'):
|
||||
return tid.split(':')[1]
|
||||
return ""
|
||||
|
||||
@@ -48,12 +48,12 @@ def split_tid(tid):
|
||||
return (mc, fn, taskname)
|
||||
|
||||
def split_tid_mcfn(tid):
|
||||
if tid.startswith('multiconfig:'):
|
||||
if tid.startswith('mc:'):
|
||||
elems = tid.split(':')
|
||||
mc = elems[1]
|
||||
fn = ":".join(elems[2:-1])
|
||||
taskname = elems[-1]
|
||||
mcfn = "multiconfig:" + mc + ":" + fn
|
||||
mcfn = "mc:" + mc + ":" + fn
|
||||
else:
|
||||
tid = tid.rsplit(":", 1)
|
||||
mc = ""
|
||||
@@ -65,7 +65,7 @@ def split_tid_mcfn(tid):
|
||||
|
||||
def build_tid(mc, fn, taskname):
|
||||
if mc:
|
||||
return "multiconfig:" + mc + ":" + fn + ":" + taskname
|
||||
return "mc:" + mc + ":" + fn + ":" + taskname
|
||||
return fn + ":" + taskname
|
||||
|
||||
class RunQueueStats:
|
||||
|
||||
@@ -179,7 +179,7 @@ class SignatureGeneratorBasic(SignatureGenerator):
|
||||
def get_taskhash(self, fn, task, deps, dataCache):
|
||||
|
||||
mc = ''
|
||||
if fn.startswith('multiconfig:'):
|
||||
if fn.startswith('mc:'):
|
||||
mc = fn.split(':')[1]
|
||||
k = fn + "." + task
|
||||
|
||||
@@ -194,7 +194,7 @@ class SignatureGeneratorBasic(SignatureGenerator):
|
||||
depmc = pkgname.split(':')[1]
|
||||
if mc != depmc:
|
||||
continue
|
||||
if dep.startswith("multiconfig:") and not mc:
|
||||
if dep.startswith("mc:") and not mc:
|
||||
continue
|
||||
depname = dataCache.pkg_fn[pkgname]
|
||||
if not self.rundep_check(fn, recipename, task, dep, depname, dataCache):
|
||||
@@ -412,13 +412,13 @@ def list_inline_diff(oldlist, newlist, colors=None):
|
||||
|
||||
def clean_basepath(a):
|
||||
mc = None
|
||||
if a.startswith("multiconfig:"):
|
||||
if a.startswith("mc:"):
|
||||
_, mc, a = a.split(":", 2)
|
||||
b = a.rsplit("/", 2)[1] + '/' + a.rsplit("/", 2)[2]
|
||||
if a.startswith("virtual:"):
|
||||
b = b + ":" + a.rsplit(":", 1)[0]
|
||||
if mc:
|
||||
b = b + ":multiconfig:" + mc
|
||||
b = b + ":mc:" + mc
|
||||
return b
|
||||
|
||||
def clean_basepaths(a):
|
||||
|
||||
@@ -81,7 +81,7 @@ class TaskData:
|
||||
def add_mcdepends(task):
|
||||
for dep in task_deps['mcdepends'][task].split():
|
||||
if len(dep.split(':')) != 5:
|
||||
bb.msg.fatal("TaskData", "Error for %s:%s[%s], multiconfig dependency %s does not contain exactly four ':' characters.\n Task '%s' should be specified in the form 'multiconfig:fromMC:toMC:packagename:task'" % (fn, task, 'mcdepends', dep, 'mcdepends'))
|
||||
bb.msg.fatal("TaskData", "Error for %s:%s[%s], multiconfig dependency %s does not contain exactly four ':' characters.\n Task '%s' should be specified in the form 'mc:fromMC:toMC:packagename:task'" % (fn, task, 'mcdepends', dep, 'mcdepends'))
|
||||
if dep not in self.mcdepends:
|
||||
self.mcdepends.append(dep)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user