diff options
author | Patrick Williams <patrick@stwcx.xyz> | 2021-07-01 00:15:45 +0300 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2021-07-01 01:37:50 +0300 |
commit | 24d05d0bba777238227121f79f3e8b02bb2bb535 (patch) | |
tree | f1af03bf2c87fdd01d98fe3372827e2bf4f9c9fe /meta-facebook/recipes-phosphor | |
parent | a430033d3bffc7d3f9f9d84611f68049d8b17f75 (diff) | |
download | openbmc-24d05d0bba777238227121f79f3e8b02bb2bb535.tar.xz |
meta-phosphor: os-release: fix task caching with DISTRO_VERSION
It was reported that the following sequence would not cause
`os-release` to rebuild:
```
bitbake os-release
git commit --amend
bitbake os-release
```
This is due to how bitbake task hashing is implemented with respect
to weak variables. In 439c59b, DISTRO_VERSION was changed to a
weak variable, but it is included in the 'vardeps' chain for
'do_compile'. When bitbake computes the hash for a task, typically
the contents of the variables are used for the hashing, but for weak
variables only the definition is used. (Confirmed by adding bb.note
debugs to `poky/bitbake/lib/bb/data.py`)
The new, weak DISTRO_VERSION is intended to be populated with contents
from a `git describe` operation. Those contents must be used in the
hashing of the 'do_compile' task and not the definition. This can be
accomplished by creating an indirection using a strong variable.
The dependency chain and hash evaluation will be as follows:
```
do_compile -> DISTRO_VERSION -> PHOSPHOR_OS_RELEASE_DISTRO_VERSION
hash(do_compile) = ... +
DISTRO_VERSION:${PHOSPHOR_OS_RELEASE_DISTRO_VERSION} +
PHOSPHOR_...DISTRO_VERSION=2.11.0-dev-...
```
Prior to this fix the hash evaluation was:
```
hash(do_compile) = ... +
DISTRO_VERSION:${@run_git...}
```
Fixes 439c59b425cf403355571875b3fa714782dcf15b.
Tested: Ensure the above reported sequence causes a rebuild of
os-release with expected data.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I0bd93d3d88bf62dfe03549419fe98ab85f10a68c
Diffstat (limited to 'meta-facebook/recipes-phosphor')
0 files changed, 0 insertions, 0 deletions