diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-09-21 22:31:57 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-09-22 11:18:11 +0100 |
commit | 88df0e4d5d09dadba0cb1e3139b19f9f2866d499 (patch) | |
tree | e2baf96c74abb665394511814e04e16ea5a2490d /bitbake/lib/bb/cooker.py | |
parent | 37d5307db01fa3d708db1abd7bfb134edbba6dc0 (diff) | |
download | poky-88df0e4d5d09dadba0cb1e3139b19f9f2866d499.tar.gz |
bitbake: 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.
(Bitbake rev: ca4f5e6d01b5c8cf315f59bc86194d63c0d3d042)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r-- | bitbake/lib/bb/cooker.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index f3252640cb..934072c44f 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
@@ -658,7 +658,7 @@ class BBCooker: | |||
658 | if task is None: | 658 | if task is None: |
659 | task = self.configuration.cmd | 659 | task = self.configuration.cmd |
660 | 660 | ||
661 | fulltargetlist = self.checkPackages(pkgs_to_build) | 661 | fulltargetlist = self.checkPackages(pkgs_to_build, task) |
662 | taskdata = {} | 662 | taskdata = {} |
663 | localdata = {} | 663 | localdata = {} |
664 | 664 | ||
@@ -1618,7 +1618,7 @@ class BBCooker: | |||
1618 | 1618 | ||
1619 | return True | 1619 | return True |
1620 | 1620 | ||
1621 | def checkPackages(self, pkgs_to_build): | 1621 | def checkPackages(self, pkgs_to_build, task=None): |
1622 | 1622 | ||
1623 | # Return a copy, don't modify the original | 1623 | # Return a copy, don't modify the original |
1624 | pkgs_to_build = pkgs_to_build[:] | 1624 | pkgs_to_build = pkgs_to_build[:] |
@@ -1634,7 +1634,7 @@ class BBCooker: | |||
1634 | if 'world' in pkgs_to_build: | 1634 | if 'world' in pkgs_to_build: |
1635 | pkgs_to_build.remove('world') | 1635 | pkgs_to_build.remove('world') |
1636 | for mc in self.multiconfigs: | 1636 | for mc in self.multiconfigs: |
1637 | bb.providers.buildWorldTargetList(self.recipecaches[mc]) | 1637 | bb.providers.buildWorldTargetList(self.recipecaches[mc], task) |
1638 | for t in self.recipecaches[mc].world_target: | 1638 | for t in self.recipecaches[mc].world_target: |
1639 | if mc: | 1639 | if mc: |
1640 | t = "multiconfig:" + mc + ":" + t | 1640 | t = "multiconfig:" + mc + ":" + t |