diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-12-16 23:38:17 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-01-26 15:45:09 +0000 |
commit | 43e9b30386586edbc0e5d514cd3a30c6e4c7cb3b (patch) | |
tree | 78a5214fd419ffbcc64825eaad2210e3018c28a0 /bitbake | |
parent | 671fe65b31ca35379916a180415e1ab7d47bd51b (diff) | |
download | poky-43e9b30386586edbc0e5d514cd3a30c6e4c7cb3b.tar.gz |
bitbake: data_smart: Ensure hash reflects vardepvalue flags correctly
The get_hash() function is used to decide if the base configuration has changed
and hence whether a reparse is required. The vardepvalue flag's value was not
expanded but it is often used in contexts like:
METADATA_REVISION = "${@base_detect_revision(d)}"
METADATA_REVISION[vardepvalue] = "${METADATA_REVISION}"
which in it's unexpanded form means reparsing doesn't happen when it should
as the data appears unchanged. Update get_hash to expand the values of
vardepvalue so reparsing works as expected. This avoids basehash mismatch
errors such as the one recently caused by using METADATA_REVISION in poky.conf's
DISTRO_VERSION variable. The issue there could be exposed by a recipe using
DISTRO_VERSION with the sequence:
bitbake os-release
<change the revision of the metadata with a dummy commit>
bitbake os-release -C install
which was caused because METADATA_REVISION changed but the metadata didn't reparse.
(Bitbake rev: cb7277e7bb3a440968fdb918d56fe8fa17bca2e6)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/data_smart.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py index c559102cf5..2328c334ac 100644 --- a/bitbake/lib/bb/data_smart.py +++ b/bitbake/lib/bb/data_smart.py | |||
@@ -1005,7 +1005,7 @@ class DataSmart(MutableMapping): | |||
1005 | else: | 1005 | else: |
1006 | data.update({key:value}) | 1006 | data.update({key:value}) |
1007 | 1007 | ||
1008 | varflags = d.getVarFlags(key, internalflags = True) | 1008 | varflags = d.getVarFlags(key, internalflags = True, expand=["vardepvalue"]) |
1009 | if not varflags: | 1009 | if not varflags: |
1010 | continue | 1010 | continue |
1011 | for f in varflags: | 1011 | for f in varflags: |