[oe-commits] [bitbake] 01/02: cooker.py: new multiconfig '*' syntax support
git at git.openembedded.org
git at git.openembedded.org
Thu Mar 16 15:34:34 UTC 2017
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch 1.32
in repository bitbake.
commit 3e80d47bea51b64ed6c8bffc033f2d11a630481e
Author: Juro Bystricky <juro.bystricky at intel.com>
AuthorDate: Sun Jan 15 11:13:36 2017 -0800
cooker.py: new multiconfig '*' syntax support
Currently you cannot build a target for all the configured multiconfigs without
specifying a list. The list can be quite long, requiring to type several lines
of text.
This enhancement is to support globbing so that you can do this,
e.g. instead of:
$ bitbake multiconfig:A:bash multiconfig:B:bash bash
you can do:
$ bitbake multiconfig:*:bash
There are real world use cases where it is desirable to use multiconfig with
two different tasks. For example: SDKs with multiple toolchains but also
containing set of additional host tools, or multiconfig builds requiring one image for
the main CPU(s) and a different co-image for a companion CPU.
For this reason, two variations of the new syntax are supported.
For example, the following:
$ bitbake multiconfig:*:meta-toolhchain
would expand to:
$ bitbake multiconfig:A:meta-toolchain multiconfig:B:meta-toolchain meta-toolchain
However the following:
$ bitbake multiconfig:*:meta-toolhchain hosttools
would expand to:
$ bitbake multiconfig:A:meta-toolchain multiconfig:B:meta-toolchain hosttools
In other words, if the user specified the "default" task explicitly, it replaces the implicit
"default" task.
[YOCTO#10680]
Signed-off-by: Juro Bystricky <juro.bystricky at intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
lib/bb/cooker.py | 32 +++++++++++++++++++++++++++++++-
1 file changed, 31 insertions(+), 1 deletion(-)
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index 0f48efc..4877c4b 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -668,7 +668,37 @@ class BBCooker:
if not task.startswith("do_"):
task = "do_%s" % task
- fulltargetlist = self.checkPackages(pkgs_to_build, task)
+ targetlist = self.checkPackages(pkgs_to_build, task)
+ fulltargetlist = []
+ defaulttask_implicit = ''
+ defaulttask_explicit = False
+ wildcard = False
+
+ # Wild card expansion:
+ # Replace string such as "multiconfig:*:bash"
+ # into "multiconfig:A:bash multiconfig:B:bash bash"
+ for k in targetlist:
+ if k.startswith("multiconfig:"):
+ if wildcard:
+ bb.fatal('multiconfig conflict')
+ if k.split(":")[1] == "*":
+ wildcard = True
+ for mc in self.multiconfigs:
+ if mc:
+ fulltargetlist.append(k.replace('*', mc))
+ # implicit default task
+ else:
+ defaulttask_implicit = k.split(":")[2]
+ else:
+ fulltargetlist.append(k)
+ else:
+ defaulttask_explicit = True
+ fulltargetlist.append(k)
+
+ if not defaulttask_explicit and defaulttask_implicit != '':
+ fulltargetlist.append(defaulttask_implicit)
+
+ bb.debug(1,"Target list: %s" % (str(fulltargetlist)))
taskdata = {}
localdata = {}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list