layer.conf: Ignore QCOM_COMMON_LICENSE_DIR variable in hash calculation#145
Closed
markyang92 wants to merge 1 commit into
Closed
layer.conf: Ignore QCOM_COMMON_LICENSE_DIR variable in hash calculation#145markyang92 wants to merge 1 commit into
markyang92 wants to merge 1 commit into
Conversation
markyang92
force-pushed
the
scarthgap
branch
from
September 30, 2025 01:14
c230af2 to
b1b9f79
Compare
Ricardo Salveti (ricardosalveti)
requested a review
from Jose Quaresma (quaresmajose)
September 30, 2025 01:22
Contributor
|
Thanks for the PR, will raise the issue internally (since this branch is not yet accepting changes directly via github). |
| " | ||
|
|
||
| QCOM_COMMON_LICENSE_DIR = "${@os.path.normpath("${LAYERDIR}")+'/files/common-licenses/'}" | ||
| BB_BASEHASH_IGNORE_VARS += "QCOM_COMMON_LICENSE_DIR" |
Contributor
There was a problem hiding this comment.
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}")}'
Author
There was a problem hiding this comment.
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...
markyang92
force-pushed
the
scarthgap
branch
4 times, most recently
from
October 1, 2025 06:50
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 <mark.yang@lge.com>
Author
|
Adding |
Contributor
|
Adding just the QCOMHWEBASE is what we need given that it is what can vary. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.