Skip to contentSkip to conversation

SYSROOTS_EXCLUDEDEPS_SYSROOT changing more hashes than I expect

DISCUSSION Jate Sujjavanich 2 participants 5 messages Jul 30, 2021 – Aug 2, 2021

lore
Share & tools
lore
#0 lore raw

I added meta-java to my bblayers.conf file, and the next build invalidated much of my sstate cache. This included such recipes as perl, which I thought would be unrelated to that layer. Through some digging, it appears that the addition to SYSROOTS_EXCLUDEDEPS_SYSROOT in meta-java affects that recipe.

I wonder if this variable should be added to something like BB_HASHBASE_WHITELIST. I'd think that the value in the exclusion should only affect the signature if it matches the current recipe. Is something more needed in a hash calculation?

- Jate S.

#1 lore raw
Quoted 8 lines · Jate Sujjavanich

I added meta-java to my bblayers.conf file, and the next build invalidated much of my sstate cache. This included such recipes as perl, which I thought would be unrelated to that layer. Through some digging, it appears that the addition to SYSROOTS_EXCLUDEDEPS_SYSROOT in meta-java affects that recipe.

I wonder if this variable should be added to something like BB_HASHBASE_WHITELIST. I'd think that the value in the exclusion should only affect the signature if it matches the current recipe. Is something more needed in a hash calculation?

It definitely should not be in BB_HASHBASE_WHITELIST. Changes in output should affect the hash and changing SYSROOTS_EXCLUDEDEPS_SYSROOT does potentially change the output.

This is a bug in meta-java where it should only be setting this for it's own recipes and not every recipe in the system.

Cheers,

Richard

#2 lore raw

The ones in meta/conf/layer.conf are much more global. This one in meta-java/conf/layer.conf certainly does not apply to perl and other irrelevant recipes.

SSTATE_EXCLUDEDEPS_SYSROOT += "\
openjdk-8-native->(ant-native|attr-native|coreutils-native|icedtea7-native|libxslt-native|make-native|openssl-native|zip-native|unzip-native) \
"
Do you have a recommendation on how to apply this strictly within meta-java? The only way I can think of is to move the EXCLUDEDEPS to the specific recipe(s). Are there any other good ways?

- Jate S.

#3 lore raw
Quoted 11 lines · Jate Sujjavanich

The ones in meta/conf/layer.conf are much more global. This one in meta-java/conf/layer.conf certainly does not apply to perl and other irrelevant recipes.

SSTATE_EXCLUDEDEPS_SYSROOT += "\
    openjdk-8-native->(ant-native|attr-native|coreutils-native|icedtea7-native|libxslt-native|make- native|openssl-native|zip-native|unzip-native) \
"

Do you have a recommendation on how to apply this strictly within meta-java? The only way I can think of is to move the EXCLUDEDEPS to the specific recipe(s). Are there any other good ways?

Sorry, your original email said "SYSROOT_<something>" and I read that as being one of the SYSROOT_* variables. I kind of filtered out the rest. SSTATE_* is a very different thing!

I think we need to add:

setscene_depvalid[vardepsexclude] = "SSTATE_EXCLUDEDEPS_SYSROOT"

to sstate.bbclass.

Cheers,

Richard

#4 lore raw

Sorry about the crucial mistyping. I tested this out with a local.conf setting. After building again, adding the meta-java layer resulted in a much cleaner build on dunfell.

Thanks
- Jate S.