bitbake: data/codeparser: Improve handling of contains functions
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 25 Nov 2013 22:59:39 +0000 (22:59 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 26 Nov 2013 23:01:33 +0000 (23:01 +0000)
commit498a255e26c9859823e3715b5ba0c5427df5c33e
treee3a2b656e2a8ed75ae0bedbb48876b2c2325b950
parent202be03217738ab4e0c3e01401a7602f557251c2
bitbake: data/codeparser: Improve handling of contains functions

One of the current frustrations with the sstate checksums is that
code like base_contains('X', 'y',...) adds a full dependency on X
and varies depend even on whitespace changes in X.

This patch adds special handling of the contains functions to expand
the first parameter and check for the flag specified by the second
parameter (assuming its a string).

The result is then appended to the value of the variable with a "Set"
or "Unset" status. If the flag is added/removed, the stored variable
value changes and hence the checksum changes. No dependency on X
is added so it is free to change with regard to other flags or
whitespace.

This code is far from ideal, ideally we'd have properly typed variables
however it fixes a major annoyance of the current checksums and
is of enough value its worth adding in a stopgap solution. It shouldn't
significantly restrict any propely typed variable implementation in
future.

(Bitbake rev: ed2d0a22a80299de0cfd377999950cf4b26c512e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bb/codeparser.py
bitbake/lib/bb/data.py
bitbake/lib/bb/data_smart.py