Re: [OE-core] [PATCH 0/7] Remove 'extend_recipe_sysroot' from 'BB_HASHEXCLUDE_COMMON'

Richard Purdie
2026-04-30T14:25:12Z

On Sat, 2026-04-18 at 20:34 +0200, Adam Blank via lists.openembedded.org wrote:
> It has lain there for a while, obscuring certain aspects of
> how task signatures are calculated.
>
> This changeset does not change the current status quo, but
> rather changes the way in which it is implemented. It can be
> followed by changes which further refine what is excluded and
> how, from those tasks which refer to 'extend_recipe_sysroot'.
>
> Related discussion:
> https://lore.kernel.org/openembedded-core/aa893eb861bf4dd18e3e84e6bbebdee3b0367d1b.camel@linuxfoundation.org/
>
> Signed-off-by: Adam Blank <adam.blank.g@gmail.com>
> ---
> Adam Blank (7):
>       package_pkgdata: fix typo to stop calling undefined function
>       staging: add 'vardepsexclude' to 'staging_populate_sysroot_dir'
>       staging: add 'extend_recipe_sysroot' to 'vardepsexclude'
>       cross: add 'extend_recipe_sysroot' to 'vardepsexclude'
>       native: add 'extend_recipe_sysroot' to 'vardepsexclude'
>       wic-tool: add 'extend_recipe_sysroot' to 'vardepsexclude'
>       bitbake.conf: remove 'extend_recipe_sysroot' from
> BB_HASHEXCLUDE_COMMON

This change does have much wider impact than it would first appear.
Even just looking at one of the first tasks in a build, quilt-
native:do_fetch, generating sig data before and after these patches
shows:

bitbake-diffsigs tmp/stamps/x86_64-linux/quilt-native/0.69.do_fetch.sigdata.*
NOTE: Starting bitbake server...
basehash_ignore_vars changed from 'frozenset({'LOGNAME', 'BUILD_ARCH', 'PARALLEL_MAKE', 'USER', 'PRSERV_LOCKDOWN', 'BB_WORKERCONTEXT', 'RUST_BUILD_SYS', 'THISDIR', 'COREBASE', 'EXTERNAL_TOOLCHAIN', 'WARN_QA', 'FILESPATH', 'CCACHE_NOHASHDIR', 'BBPATH', 'SHELL', 'STAMPCLEAN', 'CCACHE', 'DEPLOY_DIR', 'LICENSE_PATH', 'OMP_NUM_THREADS', 'SSTATE_PKGARCH', 'STAGING_DIR_HOST', 'PRSERV_HOST', 'BUILDHISTORY_DIR', 'SOURCE_DATE_EPOCH', 'BBSERVER', 'BB_LIMITEDDEPS', 'HOME', 'BB_HASHSERVE', 'BB_TASKHASH', 'PATH', 'STAGING_DIR_TARGET', 'STAMPS_DIR', 'GIT_CEILING_DIRECTORIES', 'PRSERV_DUMPFILE', 'extend_recipe_sysroot', 'RUST_HOST_SYS', 'TMPDIR', 'CCACHE_DIR', 'SSTATE_HASHEQUIV_OWNER', 'DL_DIR', 'FILESEXTRAPATHS', 'SSTATE_DIR', 'FILE', 'PWD', 'SSTATE_HASHEQUIV_METHOD', 'FILE_DIRNAME', 'PSEUDO_INCLUDE_PATHS', 'WORKDIR', 'CCACHE_TOP_DIR', 'PRSERV_DUMPDIR', 'SDKPKGSUFFIX', 'SSTATE_HASHEQUIV_REPORT_TASKDATA', 'BB_CURRENTTASK', 'PKGDATA_DIR', 'RUST_TARGET_SYS', 'BB_UNIHASH'})' to 'frozenset({'LOGNAME', 'BUILD_ARCH', 'PARALLEL_MAKE', 'USER', 'PRSERV_LOCKDOWN', 'BB_WORKERCONTEXT', 'RUST_BUILD_SYS', 'THISDIR', 'COREBASE', 'EXTERNAL_TOOLCHAIN', 'WARN_QA', 'FILESPATH', 'CCACHE_NOHASHDIR', 'BBPATH', 'SHELL', 'STAMPCLEAN', 'CCACHE', 'DEPLOY_DIR', 'LICENSE_PATH', 'OMP_NUM_THREADS', 'SSTATE_PKGARCH', 'STAGING_DIR_HOST', 'PRSERV_HOST', 'BUILDHISTORY_DIR', 'SOURCE_DATE_EPOCH', 'BBSERVER', 'BB_LIMITEDDEPS', 'HOME', 'BB_HASHSERVE', 'BB_TASKHASH', 'PATH', 'STAGING_DIR_TARGET', 'STAMPS_DIR', 'GIT_CEILING_DIRECTORIES', 'PRSERV_DUMPFILE', 'RUST_HOST_SYS', 'TMPDIR', 'CCACHE_DIR', 'SSTATE_HASHEQUIV_OWNER', 'DL_DIR', 'FILESEXTRAPATHS', 'SSTATE_DIR', 'FILE', 'PWD', 'SSTATE_HASHEQUIV_METHOD', 'FILE_DIRNAME', 'PSEUDO_INCLUDE_PATHS', 'WORKDIR', 'CCACHE_TOP_DIR', 'PRSERV_DUMPDIR', 'SDKPKGSUFFIX', 'SSTATE_HASHEQUIV_REPORT_TASKDATA', 'BB_CURRENTTASK', 'PKGDATA_DIR', 'RUST_TARGET_SYS', 'BB_UNIHASH'})'
changed items: frozenset({'extend_recipe_sysroot'})
Task dependencies changed from:
['OE_SHARED_UMASK', 'PV', 'SRC_URI', 'SRC_URI[sha256sum]', 'base_do_fetch', 'do_fetch[network]', 'do_fetch[umask]', 'fetcher_hashes_dummyfunc']
to:
['BB_RUNTASK', 'COMPONENTS_DIR', 'OE_SHARED_UMASK', 'PN', 'PV', 'RECIPE_SYSROOT', 'RECIPE_SYSROOT_MANIFEST_SUBDIR', 'RECIPE_SYSROOT_NATIVE', 'SRC_URI', 'SRC_URI[sha256sum]', 'SSTATETASKS', 'STAGING_DIR', 'base_do_fetch', 'do_fetch[network]', 'do_fetch[umask]', 'extend_recipe_sysroot', 'fetcher_hashes_dummyfunc', 'oe.path.remove', 'oe.sstatesig.find_sstate_manifest', 'oe.utils.get_multilib_datastore', 'setscene_depvalid', 'sstate_clean_manifest', 'staging_copydir', 'staging_copyfile', 'staging_populate_sysroot_dir', 'staging_processfixme']
basehash changed from fa1058e1378b6cf06cae11a9e251b7ada2d7f81a0de75644c1f693ac842576c0 to a11321c2775abee7697344dca7a79211c5de79a5de60f1e767ed9556ab434982
Dependency on variable BB_RUNTASK was added
Dependency on variable COMPONENTS_DIR was added
Dependency on variable PN was added
Dependency on variable RECIPE_SYSROOT was added
Dependency on variable RECIPE_SYSROOT_MANIFEST_SUBDIR was added
Dependency on variable RECIPE_SYSROOT_NATIVE was added
Dependency on variable SSTATETASKS was added
Dependency on variable STAGING_DIR was added
Dependency on variable extend_recipe_sysroot was added
Dependency on variable oe.path.remove was added
Dependency on variable oe.sstatesig.find_sstate_manifest was added
Dependency on variable oe.utils.get_multilib_datastore was added
Dependency on variable setscene_depvalid was added
Dependency on variable sstate_clean_manifest was added
Dependency on variable staging_copydir was added
Dependency on variable staging_copyfile was added
Dependency on variable staging_populate_sysroot_dir was added
Dependency on variable staging_processfixme was added

which is a lot of non-trivial change and a lot of extra data in the
sigdata file.

Do we really want all of this data to be added into every signature
computation?

Are we 100% sure that add the newly added variable dependencies are
"safe" and won't trigger sstate cache reuse issues?

Right now, I'm very nervous about this.

Cheers,

Richard