1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-30 00:20:08 +00: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:
Richard Purdie
2019-06-07 13:35:04 +01:00
parent 32df42cff5
commit 1f68b0bd98
5 changed files with 24 additions and 24 deletions
+6 -6
View File
@@ -237,7 +237,7 @@ def virtualfn2realfn(virtualfn):
Convert a virtual file name to a real one + the associated subclass keyword Convert a virtual file name to a real one + the associated subclass keyword
""" """
mc = "" mc = ""
if virtualfn.startswith('multiconfig:'): if virtualfn.startswith('mc:'):
elems = virtualfn.split(':') elems = virtualfn.split(':')
mc = elems[1] mc = elems[1]
virtualfn = ":".join(elems[2:]) virtualfn = ":".join(elems[2:])
@@ -258,7 +258,7 @@ def realfn2virtual(realfn, cls, mc):
if cls: if cls:
realfn = "virtual:" + cls + ":" + realfn realfn = "virtual:" + cls + ":" + realfn
if mc: if mc:
realfn = "multiconfig:" + mc + ":" + realfn realfn = "mc:" + mc + ":" + realfn
return realfn return realfn
def variant2virtual(realfn, variant): def variant2virtual(realfn, variant):
@@ -267,11 +267,11 @@ def variant2virtual(realfn, variant):
""" """
if variant == "": if variant == "":
return realfn return realfn
if variant.startswith("multiconfig:"): if variant.startswith("mc:"):
elems = variant.split(":") elems = variant.split(":")
if elems[2]: if elems[2]:
return "multiconfig:" + elems[1] + ":virtual:" + ":".join(elems[2:]) + ":" + realfn return "mc:" + elems[1] + ":virtual:" + ":".join(elems[2:]) + ":" + realfn
return "multiconfig:" + elems[1] + ":" + realfn return "mc:" + elems[1] + ":" + realfn
return "virtual:" + variant + ":" + realfn return "virtual:" + variant + ":" + realfn
def parse_recipe(bb_data, bbfile, appends, mc=''): def parse_recipe(bb_data, bbfile, appends, mc=''):
@@ -349,7 +349,7 @@ class NoCache(object):
bb_data = self.databuilder.mcdata[mc].createCopy() bb_data = self.databuilder.mcdata[mc].createCopy()
newstores = parse_recipe(bb_data, bbfile, appends, mc) newstores = parse_recipe(bb_data, bbfile, appends, mc)
for ns in newstores: for ns in newstores:
datastores["multiconfig:%s:%s" % (mc, ns)] = newstores[ns] datastores["mc:%s:%s" % (mc, ns)] = newstores[ns]
return datastores return datastores
+9 -9
View File
@@ -505,7 +505,7 @@ class BBCooker:
self.reset() self.reset()
def mc_base(p): def mc_base(p):
if p.startswith('multiconfig:'): if p.startswith('mc:'):
s = p.split(':') s = p.split(':')
if len(s) == 2: if len(s) == 2:
return s[1] return s[1]
@@ -583,10 +583,10 @@ class BBCooker:
wildcard = False wildcard = False
# Wild card expansion: # Wild card expansion:
# Replace string such as "multiconfig:*:bash" # Replace string such as "mc:*:bash"
# into "multiconfig:A:bash multiconfig:B:bash bash" # into "mc:A:bash mc:B:bash bash"
for k in targetlist: for k in targetlist:
if k.startswith("multiconfig:"): if k.startswith("mc:"):
if wildcard: if wildcard:
bb.fatal('multiconfig conflict') bb.fatal('multiconfig conflict')
if k.split(":")[1] == "*": if k.split(":")[1] == "*":
@@ -619,7 +619,7 @@ class BBCooker:
runlist = [] runlist = []
for k in fulltargetlist: for k in fulltargetlist:
mc = "" mc = ""
if k.startswith("multiconfig:"): if k.startswith("mc:"):
mc = k.split(":")[1] mc = k.split(":")[1]
k = ":".join(k.split(":")[2:]) k = ":".join(k.split(":")[2:])
ktask = task ktask = task
@@ -700,7 +700,7 @@ class BBCooker:
@staticmethod @staticmethod
def add_mc_prefix(mc, pn): def add_mc_prefix(mc, pn):
if mc: if mc:
return "multiconfig:%s:%s" % (mc, pn) return "mc:%s:%s" % (mc, pn)
return pn return pn
def buildDependTree(self, rq, taskdata): def buildDependTree(self, rq, taskdata):
@@ -1477,7 +1477,7 @@ class BBCooker:
ntargets = [] ntargets = []
for target in runlist: for target in runlist:
if target[0]: 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])) ntargets.append("%s:%s" % (target[1], target[2]))
for mc in self.multiconfigs: for mc in self.multiconfigs:
@@ -1607,7 +1607,7 @@ class BBCooker:
bb.providers.buildWorldTargetList(self.recipecaches[mc], task) bb.providers.buildWorldTargetList(self.recipecaches[mc], task)
for t in self.recipecaches[mc].world_target: for t in self.recipecaches[mc].world_target:
if mc: if mc:
t = "multiconfig:" + mc + ":" + t t = "mc:" + mc + ":" + t
pkgs_to_build.append(t) pkgs_to_build.append(t)
if 'universe' in pkgs_to_build: 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)) bb.debug(1, "Skipping %s for universe tasks as task %s doesn't exist" % (t, task))
continue continue
if mc: if mc:
t = "multiconfig:" + mc + ":" + t t = "mc:" + mc + ":" + t
pkgs_to_build.append(t) pkgs_to_build.append(t)
return pkgs_to_build return pkgs_to_build
+4 -4
View File
@@ -39,7 +39,7 @@ def taskname_from_tid(tid):
return tid.rsplit(":", 1)[1] return tid.rsplit(":", 1)[1]
def mc_from_tid(tid): def mc_from_tid(tid):
if tid.startswith('multiconfig:'): if tid.startswith('mc:'):
return tid.split(':')[1] return tid.split(':')[1]
return "" return ""
@@ -48,12 +48,12 @@ def split_tid(tid):
return (mc, fn, taskname) return (mc, fn, taskname)
def split_tid_mcfn(tid): def split_tid_mcfn(tid):
if tid.startswith('multiconfig:'): if tid.startswith('mc:'):
elems = tid.split(':') elems = tid.split(':')
mc = elems[1] mc = elems[1]
fn = ":".join(elems[2:-1]) fn = ":".join(elems[2:-1])
taskname = elems[-1] taskname = elems[-1]
mcfn = "multiconfig:" + mc + ":" + fn mcfn = "mc:" + mc + ":" + fn
else: else:
tid = tid.rsplit(":", 1) tid = tid.rsplit(":", 1)
mc = "" mc = ""
@@ -65,7 +65,7 @@ def split_tid_mcfn(tid):
def build_tid(mc, fn, taskname): def build_tid(mc, fn, taskname):
if mc: if mc:
return "multiconfig:" + mc + ":" + fn + ":" + taskname return "mc:" + mc + ":" + fn + ":" + taskname
return fn + ":" + taskname return fn + ":" + taskname
class RunQueueStats: class RunQueueStats:
+4 -4
View File
@@ -179,7 +179,7 @@ class SignatureGeneratorBasic(SignatureGenerator):
def get_taskhash(self, fn, task, deps, dataCache): def get_taskhash(self, fn, task, deps, dataCache):
mc = '' mc = ''
if fn.startswith('multiconfig:'): if fn.startswith('mc:'):
mc = fn.split(':')[1] mc = fn.split(':')[1]
k = fn + "." + task k = fn + "." + task
@@ -194,7 +194,7 @@ class SignatureGeneratorBasic(SignatureGenerator):
depmc = pkgname.split(':')[1] depmc = pkgname.split(':')[1]
if mc != depmc: if mc != depmc:
continue continue
if dep.startswith("multiconfig:") and not mc: if dep.startswith("mc:") and not mc:
continue continue
depname = dataCache.pkg_fn[pkgname] depname = dataCache.pkg_fn[pkgname]
if not self.rundep_check(fn, recipename, task, dep, depname, dataCache): 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): def clean_basepath(a):
mc = None mc = None
if a.startswith("multiconfig:"): if a.startswith("mc:"):
_, mc, a = a.split(":", 2) _, mc, a = a.split(":", 2)
b = a.rsplit("/", 2)[1] + '/' + a.rsplit("/", 2)[2] b = a.rsplit("/", 2)[1] + '/' + a.rsplit("/", 2)[2]
if a.startswith("virtual:"): if a.startswith("virtual:"):
b = b + ":" + a.rsplit(":", 1)[0] b = b + ":" + a.rsplit(":", 1)[0]
if mc: if mc:
b = b + ":multiconfig:" + mc b = b + ":mc:" + mc
return b return b
def clean_basepaths(a): def clean_basepaths(a):
+1 -1
View File
@@ -81,7 +81,7 @@ class TaskData:
def add_mcdepends(task): def add_mcdepends(task):
for dep in task_deps['mcdepends'][task].split(): for dep in task_deps['mcdepends'][task].split():
if len(dep.split(':')) != 5: 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: if dep not in self.mcdepends:
self.mcdepends.append(dep) self.mcdepends.append(dep)