[oe-commits] [bitbake] 04/04: cooker: Tweak multiconfig dependency resolution
git at git.openembedded.org
git at git.openembedded.org
Mon Feb 25 22:33:44 UTC 2019
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch 1.40
in repository bitbake.
commit b59cb2bc63940b9ebd8288de7ca4b1d9e96e026c
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Sat Feb 23 10:28:57 2019 +0000
cooker: Tweak multiconfig dependency resolution
There were a couple of problems with the multiconfig dependency resolution:
- the "if mc" condition triggering this code wasn't correct, it needs
to be "if more than one multiconfig" configured
- after adding providers we need to call add_unresolved again
and rebuild mcdeps within the "while new" loop
By fixing these issues we allow various other combinations of multiconfig
builds to work which previously didn't.
[YOCTO #13090]
[YOCTO #13130]
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
lib/bb/cooker.py | 53 ++++++++++++++++++++++++-----------------------------
1 file changed, 24 insertions(+), 29 deletions(-)
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index db52964..adc4101 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -641,35 +641,30 @@ class BBCooker:
# No need to do check providers if there are no mcdeps or not an mc build
- if mc:
- # Add unresolved first, so we can get multiconfig indirect dependencies on time
- for mcavailable in self.multiconfigs:
- # The first element is empty
- if mcavailable:
- taskdata[mcavailable].add_unresolved(localdata[mcavailable], self.recipecaches[mcavailable])
-
-
- mcdeps = taskdata[mc].get_mcdepends()
-
- if mcdeps:
- # Make sure we can provide the multiconfig dependency
- seen = set()
- new = True
- while new:
- new = False
- for mc in self.multiconfigs:
- for k in mcdeps:
- if k in seen:
- continue
- l = k.split(':')
- depmc = l[2]
- if depmc not in self.multiconfigs:
- bb.fatal("Multiconfig dependency %s depends on nonexistent mc configuration %s" % (k,depmc))
- else:
- logger.debug(1, "Adding providers for multiconfig dependency %s" % l[3])
- taskdata[depmc].add_provider(localdata[depmc], self.recipecaches[depmc], l[3])
- seen.add(k)
- new = True
+ if len(self.multiconfigs) > 1:
+ seen = set()
+ new = True
+ # Make sure we can provide the multiconfig dependency
+ while new:
+ mcdeps = set()
+ # Add unresolved first, so we can get multiconfig indirect dependencies on time
+ for mc in self.multiconfigs:
+ taskdata[mc].add_unresolved(localdata[mc], self.recipecaches[mc])
+ mcdeps |= set(taskdata[mc].get_mcdepends())
+ new = False
+ for mc in self.multiconfigs:
+ for k in mcdeps:
+ if k in seen:
+ continue
+ l = k.split(':')
+ depmc = l[2]
+ if depmc not in self.multiconfigs:
+ bb.fatal("Multiconfig dependency %s depends on nonexistent mc configuration %s" % (k,depmc))
+ else:
+ logger.debug(1, "Adding providers for multiconfig dependency %s" % l[3])
+ taskdata[depmc].add_provider(localdata[depmc], self.recipecaches[depmc], l[3])
+ seen.add(k)
+ new = True
for mc in self.multiconfigs:
taskdata[mc].add_unresolved(localdata[mc], self.recipecaches[mc])
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list