[bitbake-devel] [PATCH] data_smart: Expand overrides cache recursively
Christopher Larson
clarson at kergoth.com
Wed Sep 16 21:11:17 UTC 2015
On Wed, Sep 16, 2015 at 1:57 PM, Richard Purdie <
richard.purdie at linuxfoundation.org> wrote:
> + while changed:
> self.inoverride = True
> # Can end up here recursively so setup dummy values
> self.overrides = []
> @@ -431,6 +435,14 @@ class DataSmart(MutableMapping):
> self.overridesset = set(self.overrides)
> self.inoverride = False
> self.expand_cache = {}
> + newoverrides = (self.getVar("OVERRIDES", True) or
> "").split(":") or []
> + if newoverrides == self.overrides:
> + changed = False
> + self.overrides = newoverrides
> + self.overridesset = set(self.overrides)
> + count += 1
> + if count > 5:
> + bb.fatal("Overrides could not be expanded into a stable
> state after 5 iterations, overrides must be being referenced by other
> overridden variables in some recursive fashion. Please provide your
> configuration to bitbake-devel so we can laugh, er, I mean try and
> understand how to make it work.")
>
We know the maximum number of iterations here, so it might be worth doing a
for count in range(5): .. if newoverrides == self.overrides: break, and the
else block on the loop would indicate it never broke and therefore we hit
the count > 5 case. That'd eliminate the manual count bits.
--
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/bitbake-devel/attachments/20150916/8a56562d/attachment-0002.html>
More information about the bitbake-devel
mailing list