summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-06-07 13:35:04 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-06-10 14:46:38 +0100
commit1f68b0bd98ab0d9aeb7e5dae560d9d505ffac7c3 (patch)
treefc1d636189ead1d83a5d252bddc5240c5b25db7f /bitbake/lib
parent32df42cff5370bb0bda51f0f637357c18ee3b1eb (diff)
downloadpoky-1f68b0bd98ab0d9aeb7e5dae560d9d505ffac7c3.tar.gz
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>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/cache.py12
-rw-r--r--bitbake/lib/bb/cooker.py18
-rw-r--r--bitbake/lib/bb/runqueue.py8
-rw-r--r--bitbake/lib/bb/siggen.py8
-rw-r--r--bitbake/lib/bb/taskdata.py2
5 files changed, 24 insertions, 24 deletions
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py
index 060758e0c4..5fb2f17cda 100644
--- a/bitbake/lib/bb/cache.py
+++ b/bitbake/lib/bb/cache.py
@@ -237,7 +237,7 @@ def virtualfn2realfn(virtualfn):
237 Convert a virtual file name to a real one + the associated subclass keyword 237 Convert a virtual file name to a real one + the associated subclass keyword
238 """ 238 """
239 mc = "" 239 mc = ""
240 if virtualfn.startswith('multiconfig:'): 240 if virtualfn.startswith('mc:'):
241 elems = virtualfn.split(':') 241 elems = virtualfn.split(':')
242 mc = elems[1] 242 mc = elems[1]
243 virtualfn = ":".join(elems[2:]) 243 virtualfn = ":".join(elems[2:])
@@ -258,7 +258,7 @@ def realfn2virtual(realfn, cls, mc):
258 if cls: 258 if cls:
259 realfn = "virtual:" + cls + ":" + realfn 259 realfn = "virtual:" + cls + ":" + realfn
260 if mc: 260 if mc:
261 realfn = "multiconfig:" + mc + ":" + realfn 261 realfn = "mc:" + mc + ":" + realfn
262 return realfn 262 return realfn
263 263
264def variant2virtual(realfn, variant): 264def variant2virtual(realfn, variant):
@@ -267,11 +267,11 @@ def variant2virtual(realfn, variant):
267 """ 267 """
268 if variant == "": 268 if variant == "":
269 return realfn 269 return realfn
270 if variant.startswith("multiconfig:"): 270 if variant.startswith("mc:"):
271 elems = variant.split(":") 271 elems = variant.split(":")
272 if elems[2]: 272 if elems[2]:
273 return "multiconfig:" + elems[1] + ":virtual:" + ":".join(elems[2:]) + ":" + realfn 273 return "mc:" + elems[1] + ":virtual:" + ":".join(elems[2:]) + ":" + realfn
274 return "multiconfig:" + elems[1] + ":" + realfn 274 return "mc:" + elems[1] + ":" + realfn
275 return "virtual:" + variant + ":" + realfn 275 return "virtual:" + variant + ":" + realfn
276 276
277def parse_recipe(bb_data, bbfile, appends, mc=''): 277def parse_recipe(bb_data, bbfile, appends, mc=''):
@@ -349,7 +349,7 @@ class NoCache(object):
349 bb_data = self.databuilder.mcdata[mc].createCopy() 349 bb_data = self.databuilder.mcdata[mc].createCopy()
350 newstores = parse_recipe(bb_data, bbfile, appends, mc) 350 newstores = parse_recipe(bb_data, bbfile, appends, mc)
351 for ns in newstores: 351 for ns in newstores:
352 datastores["multiconfig:%s:%s" % (mc, ns)] = newstores[ns] 352 datastores["mc:%s:%s" % (mc, ns)] = newstores[ns]
353 353
354 return datastores 354 return datastores
355 355
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index d183abab6d..855a180523 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -505,7 +505,7 @@ class BBCooker:
505 self.reset() 505 self.reset()
506 506
507 def mc_base(p): 507 def mc_base(p):
508 if p.startswith('multiconfig:'): 508 if p.startswith('mc:'):
509 s = p.split(':') 509 s = p.split(':')
510 if len(s) == 2: 510 if len(s) == 2:
511 return s[1] 511 return s[1]
@@ -583,10 +583,10 @@ class BBCooker:
583 wildcard = False 583 wildcard = False
584 584
585 # Wild card expansion: 585 # Wild card expansion:
586 # Replace string such as "multiconfig:*:bash" 586 # Replace string such as "mc:*:bash"
587 # into "multiconfig:A:bash multiconfig:B:bash bash" 587 # into "mc:A:bash mc:B:bash bash"
588 for k in targetlist: 588 for k in targetlist:
589 if k.startswith("multiconfig:"): 589 if k.startswith("mc:"):
590 if wildcard: 590 if wildcard:
591 bb.fatal('multiconfig conflict') 591 bb.fatal('multiconfig conflict')
592 if k.split(":")[1] == "*": 592 if k.split(":")[1] == "*":
@@ -619,7 +619,7 @@ class BBCooker:
619 runlist = [] 619 runlist = []
620 for k in fulltargetlist: 620 for k in fulltargetlist:
621 mc = "" 621 mc = ""
622 if k.startswith("multiconfig:"): 622 if k.startswith("mc:"):
623 mc = k.split(":")[1] 623 mc = k.split(":")[1]
624 k = ":".join(k.split(":")[2:]) 624 k = ":".join(k.split(":")[2:])
625 ktask = task 625 ktask = task
@@ -700,7 +700,7 @@ class BBCooker:
700 @staticmethod 700 @staticmethod
701 def add_mc_prefix(mc, pn): 701 def add_mc_prefix(mc, pn):
702 if mc: 702 if mc:
703 return "multiconfig:%s:%s" % (mc, pn) 703 return "mc:%s:%s" % (mc, pn)
704 return pn 704 return pn
705 705
706 def buildDependTree(self, rq, taskdata): 706 def buildDependTree(self, rq, taskdata):
@@ -1477,7 +1477,7 @@ class BBCooker:
1477 ntargets = [] 1477 ntargets = []
1478 for target in runlist: 1478 for target in runlist:
1479 if target[0]: 1479 if target[0]:
1480 ntargets.append("multiconfig:%s:%s:%s" % (target[0], target[1], target[2])) 1480 ntargets.append("mc:%s:%s:%s" % (target[0], target[1], target[2]))
1481 ntargets.append("%s:%s" % (target[1], target[2])) 1481 ntargets.append("%s:%s" % (target[1], target[2]))
1482 1482
1483 for mc in self.multiconfigs: 1483 for mc in self.multiconfigs:
@@ -1607,7 +1607,7 @@ class BBCooker:
1607 bb.providers.buildWorldTargetList(self.recipecaches[mc], task) 1607 bb.providers.buildWorldTargetList(self.recipecaches[mc], task)
1608 for t in self.recipecaches[mc].world_target: 1608 for t in self.recipecaches[mc].world_target:
1609 if mc: 1609 if mc:
1610 t = "multiconfig:" + mc + ":" + t 1610 t = "mc:" + mc + ":" + t
1611 pkgs_to_build.append(t) 1611 pkgs_to_build.append(t)
1612 1612
1613 if 'universe' in pkgs_to_build: 1613 if 'universe' in pkgs_to_build:
@@ -1626,7 +1626,7 @@ class BBCooker:
1626 bb.debug(1, "Skipping %s for universe tasks as task %s doesn't exist" % (t, task)) 1626 bb.debug(1, "Skipping %s for universe tasks as task %s doesn't exist" % (t, task))
1627 continue 1627 continue
1628 if mc: 1628 if mc:
1629 t = "multiconfig:" + mc + ":" + t 1629 t = "mc:" + mc + ":" + t
1630 pkgs_to_build.append(t) 1630 pkgs_to_build.append(t)
1631 1631
1632 return pkgs_to_build 1632 return pkgs_to_build
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index d573ed460e..010b085010 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -39,7 +39,7 @@ def taskname_from_tid(tid):
39 return tid.rsplit(":", 1)[1] 39 return tid.rsplit(":", 1)[1]
40 40
41def mc_from_tid(tid): 41def mc_from_tid(tid):
42 if tid.startswith('multiconfig:'): 42 if tid.startswith('mc:'):
43 return tid.split(':')[1] 43 return tid.split(':')[1]
44 return "" 44 return ""
45 45
@@ -48,12 +48,12 @@ def split_tid(tid):
48 return (mc, fn, taskname) 48 return (mc, fn, taskname)
49 49
50def split_tid_mcfn(tid): 50def split_tid_mcfn(tid):
51 if tid.startswith('multiconfig:'): 51 if tid.startswith('mc:'):
52 elems = tid.split(':') 52 elems = tid.split(':')
53 mc = elems[1] 53 mc = elems[1]
54 fn = ":".join(elems[2:-1]) 54 fn = ":".join(elems[2:-1])
55 taskname = elems[-1] 55 taskname = elems[-1]
56 mcfn = "multiconfig:" + mc + ":" + fn 56 mcfn = "mc:" + mc + ":" + fn
57 else: 57 else:
58 tid = tid.rsplit(":", 1) 58 tid = tid.rsplit(":", 1)
59 mc = "" 59 mc = ""
@@ -65,7 +65,7 @@ def split_tid_mcfn(tid):
65 65
66def build_tid(mc, fn, taskname): 66def build_tid(mc, fn, taskname):
67 if mc: 67 if mc:
68 return "multiconfig:" + mc + ":" + fn + ":" + taskname 68 return "mc:" + mc + ":" + fn + ":" + taskname
69 return fn + ":" + taskname 69 return fn + ":" + taskname
70 70
71class RunQueueStats: 71class RunQueueStats:
diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py
index e0a66e68d5..fe580e487f 100644
--- a/bitbake/lib/bb/siggen.py
+++ b/bitbake/lib/bb/siggen.py
@@ -179,7 +179,7 @@ class SignatureGeneratorBasic(SignatureGenerator):
179 def get_taskhash(self, fn, task, deps, dataCache): 179 def get_taskhash(self, fn, task, deps, dataCache):
180 180
181 mc = '' 181 mc = ''
182 if fn.startswith('multiconfig:'): 182 if fn.startswith('mc:'):
183 mc = fn.split(':')[1] 183 mc = fn.split(':')[1]
184 k = fn + "." + task 184 k = fn + "." + task
185 185
@@ -194,7 +194,7 @@ class SignatureGeneratorBasic(SignatureGenerator):
194 depmc = pkgname.split(':')[1] 194 depmc = pkgname.split(':')[1]
195 if mc != depmc: 195 if mc != depmc:
196 continue 196 continue
197 if dep.startswith("multiconfig:") and not mc: 197 if dep.startswith("mc:") and not mc:
198 continue 198 continue
199 depname = dataCache.pkg_fn[pkgname] 199 depname = dataCache.pkg_fn[pkgname]
200 if not self.rundep_check(fn, recipename, task, dep, depname, dataCache): 200 if not self.rundep_check(fn, recipename, task, dep, depname, dataCache):
@@ -412,13 +412,13 @@ def list_inline_diff(oldlist, newlist, colors=None):
412 412
413def clean_basepath(a): 413def clean_basepath(a):
414 mc = None 414 mc = None
415 if a.startswith("multiconfig:"): 415 if a.startswith("mc:"):
416 _, mc, a = a.split(":", 2) 416 _, mc, a = a.split(":", 2)
417 b = a.rsplit("/", 2)[1] + '/' + a.rsplit("/", 2)[2] 417 b = a.rsplit("/", 2)[1] + '/' + a.rsplit("/", 2)[2]
418 if a.startswith("virtual:"): 418 if a.startswith("virtual:"):
419 b = b + ":" + a.rsplit(":", 1)[0] 419 b = b + ":" + a.rsplit(":", 1)[0]
420 if mc: 420 if mc:
421 b = b + ":multiconfig:" + mc 421 b = b + ":mc:" + mc
422 return b 422 return b
423 423
424def clean_basepaths(a): 424def clean_basepaths(a):
diff --git a/bitbake/lib/bb/taskdata.py b/bitbake/lib/bb/taskdata.py
index c7de3db38d..d13bd7c3bf 100644
--- a/bitbake/lib/bb/taskdata.py
+++ b/bitbake/lib/bb/taskdata.py
@@ -81,7 +81,7 @@ class TaskData:
81 def add_mcdepends(task): 81 def add_mcdepends(task):
82 for dep in task_deps['mcdepends'][task].split(): 82 for dep in task_deps['mcdepends'][task].split():
83 if len(dep.split(':')) != 5: 83 if len(dep.split(':')) != 5:
84 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')) 84 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'))
85 if dep not in self.mcdepends: 85 if dep not in self.mcdepends:
86 self.mcdepends.append(dep) 86 self.mcdepends.append(dep)
87 87