* [PATCH] cooker/providers: Only add target to world build if task exists
@ 2016-09-21 21:31 Richard Purdie
0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2016-09-21 21:31 UTC (permalink / raw)
To: bitbake-devel
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@linuxfoundation.org>
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 0e78106..606b08e 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/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 = {}
@@ -1586,7 +1586,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[:]
@@ -1602,7 +1602,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/bitbake/lib/bb/providers.py b/bitbake/lib/bb/providers.py
index 80701b2..db02a0b 100644
--- a/bitbake/lib/bb/providers.py
+++ b/bitbake/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/'):
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-09-21 21:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-21 21:31 [PATCH] cooker/providers: Only add target to world build if task exists Richard Purdie
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.