[oe-commits] [bitbake] branch master-next updated: cooker/providers: Only add target to world build if task exists
git at git.openembedded.org
git at git.openembedded.org
Wed Sep 21 21:34:35 UTC 2016
rpurdie pushed a commit to branch master-next
in repository bitbake.
The following commit(s) were added to refs/heads/master-next by this push:
new ca4f5e6 cooker/providers: Only add target to world build if task exists
ca4f5e6 is described below
commit ca4f5e6d01b5c8cf315f59bc86194d63c0d3d042
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Wed Sep 21 22:31:57 2016 +0100
cooker/providers: Only add target to world build if task exists
A "bitbake world -c unpack" currently breaks as not all tasks have an
unpack task. This change allows addition of world targets only if the
specified task exists which makes certain commands possible when otherwise
you just get errors which can't easily be avoided.
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
lib/bb/cooker.py | 6 +++---
lib/bb/providers.py | 5 ++++-
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index f325264..934072c 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -658,7 +658,7 @@ class BBCooker:
if task is None:
task = self.configuration.cmd
- fulltargetlist = self.checkPackages(pkgs_to_build)
+ fulltargetlist = self.checkPackages(pkgs_to_build, task)
taskdata = {}
localdata = {}
@@ -1618,7 +1618,7 @@ class BBCooker:
return True
- def checkPackages(self, pkgs_to_build):
+ def checkPackages(self, pkgs_to_build, task=None):
# Return a copy, don't modify the original
pkgs_to_build = pkgs_to_build[:]
@@ -1634,7 +1634,7 @@ class BBCooker:
if 'world' in pkgs_to_build:
pkgs_to_build.remove('world')
for mc in self.multiconfigs:
- bb.providers.buildWorldTargetList(self.recipecaches[mc])
+ bb.providers.buildWorldTargetList(self.recipecaches[mc], task)
for t in self.recipecaches[mc].world_target:
if mc:
t = "multiconfig:" + mc + ":" + t
diff --git a/lib/bb/providers.py b/lib/bb/providers.py
index 80701b2..db02a0b 100644
--- a/lib/bb/providers.py
+++ b/lib/bb/providers.py
@@ -402,7 +402,7 @@ def getRuntimeProviders(dataCache, rdepend):
return rproviders
-def buildWorldTargetList(dataCache):
+def buildWorldTargetList(dataCache, task=None):
"""
Build package list for "bitbake world"
"""
@@ -413,6 +413,9 @@ def buildWorldTargetList(dataCache):
for f in dataCache.possible_world:
terminal = True
pn = dataCache.pkg_fn[f]
+ if task and task not in dataCache.task_deps[f]['tasks']:
+ logger.debug(2, "World build skipping %s as task %s doesn't exist", f, task)
+ terminal = False
for p in dataCache.pn_provides[pn]:
if p.startswith('virtual/'):
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list