aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-02-23 10:28:57 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-02-23 10:40:39 +0000
commit4359b037de578095db2595f119dfb8e3340e1414 (patch)
tree8faa6221838ee548b94a8518b927fc7402bb96d0
parentc883dfe378af9dfc192a8e392e84325d68648806 (diff)
downloadbitbake-contrib-4359b037de578095db2595f119dfb8e3340e1414.tar.gz
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@linuxfoundation.org>
-rw-r--r--lib/bb/cooker.py53
1 files changed, 24 insertions, 29 deletions
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index e6b8d880a..1982e880b 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])