-
Couldn't load subscription status.
- Fork 28
layer.conf: Ignore QCOM_COMMON_LICENSE_DIR variable in hash calculation #145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: scarthgap
Are you sure you want to change the base?
Conversation
c230af2 to
b1b9f79
Compare
|
Thanks for the PR, will raise the issue internally (since this branch is not yet accepting changes directly via github). |
conf/layer.conf
Outdated
| " | ||
|
|
||
| QCOM_COMMON_LICENSE_DIR = "${@os.path.normpath("${LAYERDIR}")+'/files/common-licenses/'}" | ||
| BB_BASEHASH_IGNORE_VARS += "QCOM_COMMON_LICENSE_DIR" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Full ignore the QCOM_COMMON_LICENSE_DIR can be problematic, we should just ignore what is not relevant in this case.
Can you please try this patch:
diff --git a/conf/layer.conf b/conf/layer.conf
index c1f1d1a5..320b3885 100644
--- a/conf/layer.conf
+++ b/conf/layer.conf
@@ -32,7 +32,8 @@ BBFILES_DYNAMIC += " \
virtualization-layer:${LAYERDIR}/dynamic-layers/virtualization-layer/*/*/*.bbappend \
"
-QCOM_COMMON_LICENSE_DIR = "${@os.path.normpath("${LAYERDIR}")+'/files/common-licenses/'}"
+QCOM_COMMON_LICENSE_DIR = "${QCOMHWEBASE}/files/common-licenses/"
+QCOM_COMMON_LICENSE_DIR[vardepsexclude] += "QCOMHWEBASE"
# Set a variable to get to the top of this metalayer
QCOMHWEBASE = '${@os.path.normpath("${LAYERDIR}")}'There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TOPDIR2/tmp/sstate-diff/1759282003/qcs6490-rb3gen2-vision-kit/<TRIPLE>/time-genoff $ bitbake-diffsigs ./15.0.do_package.sigdata.d7e8c5594f92c6e626d52a106c39a7b2fac6dc4d3e351170ebfb4e72222b000b \
> TOPDIR1/tmp/sstate-diff/1759282001/qcs6490-rb3gen2-vision-kit/<TRIPLE>/time-genoff/15.0.do_package.sigdata.d7e8c5594f92c6e626d52a106c39a7b2fac6dc4d3e351170ebfb4e72222b000b
NOTE: Starting bitbake server...
ba6b11d to
73a508c
Compare
…LIC_FILES_CHKSUM
Since TOPDIR is appended to the LAYERDIR path contained in this variable,
building from a different directory reduces the sstate-cache hit rate for recipes that use QCOM_COMMON_LICENSE_DIR.
```
TOPDIR1/tmp/sstate-diff/1759133466/qcs6490-rb3gen2-vision-kit/<TRIPLE>/time-genoff $ bitbake-diffsigs ./15.0.do_package.sigdata.28f71c835e5ca367eadc9011ae70403e8cb2bf33b8ae20fa040df5d69dfb6cfe \
TOPDIR2/tmp/sstate-diff/1759133333/qcs6490-rb3gen2-vision-kit/<TRIPLE>/time-genoff/15.0.do_package.sigdata.9eabc9947518db7de3427e8da226b6650ad4b3dad7b6659cbb21245a28460a32
NOTE: Starting bitbake server...
basehash changed from 9990fb107900393658bf819b17528ee4810cefe6d09660e6320eccc4e119dac0 to 327c12e7c95192e2d172d7022c2bdbadd292b5a687b0acc1ab939f19c2f7d216
Variable QCOM_COMMON_LICENSE_DIR value changed from '${@os.path.normpath("TOPDIR1/meta-qcom/meta-qcom-hwe")+'/files/common-licenses/'}' to '${@os.path.normpath("TOPDIR2/meta-qcom/meta-qcom-hwe")+'/files/common-licenses/'}'
```
```
List of dependencies for variable LIC_FILES_CHKSUM is ['LICENSE', 'QCOM_COMMON_LICENSE_DIR']
List of dependencies for variable QCOM_COMMON_LICENSE_DIR is []
Variable LIC_FILES_CHKSUM value is file://${QCOM_COMMON_LICENSE_DIR}${LICENSE};md5=58d50a3d36f27f1a1e6089308a49b403
Variable QCOM_COMMON_LICENSE_DIR value is ${@os.path.normpath("TOPDIR1/meta-qcom/meta-qcom-hwe")+'/files/common-licenses/'}
```
The recipe directly depends on `LIC_FILES_CHKSUM`, and `LIC_FILES_CHKSUM` references `QCOM_COMMON_DIR`.
Therefore, excluding `QCOM_COMMON_LICENSE_DIR` from the hash value calculation in `LIC_FILES_CHKSUM` would ideally work.
```
TOPDIR2/tmp/sstate-diff/1759299422/qcs6490-rb3gen2-vision-kit/<TRIPLE>/time-genoff $ bitbake-dumpsig ./15.0.do_package.sigdata.763beb6ace3413d57a0a8e15a00d6ec3baf541ebfb050ebae2b627b3f03cecca | grep QCOM_COMMON_LICENSE_DIR
Variable LIC_FILES_CHKSUM value is file://${QCOM_COMMON_LICENSE_DIR}${LICENSE};md5=58d50a3d36f27f1a1e6089308a49b403
TOPDIR2/tmp/sstate-diff/1759299422/qcs6490-rb3gen2-vision-kit/<TRIPLE>/time-genoff $ bitbake-diffsigs ./15.0.do_package.sigdata.763beb6ace3413d57a0a8e15a00d6ec3baf541ebfb050ebae2b627b3f03cecca \
TOPDIR1/tmp/sstate-diff/1759299416/qcs6490-rb3gen2-vision-kit/<TRIPLE>/time-genoff/15.0.do_package.sigdata.763beb6ace3413d57a0a8e15a00d6ec3baf541ebfb050ebae2b627b3f03cecca
```
Signed-off-by: mark.yang <[email protected]>
|
Adding |
|
Adding just the QCOMHWEBASE is what we need given that it is what can vary. |
Since TOPDIR is appended to the LAYERDIR path contained in this variable, building from a different directory reduces the sstate-cache hit rate for recipes that use QCOM_COMMON_LICENSE_DIR.