Bug 16043

Summary: the 'tag=${PV}' result in BB_FETCH_PREMIRRORONLY can't work
Product: [Build System, Metadata & Runtime] BitBake Reporter: niqingliang2003 <niqingliang2003>
Component: bitbakeAssignee: Ross Burton <ross.burton>
Status: RESOLVED FIXED QA Contact:
Severity: critical    
Priority: Medium CC: poky.bs.watcher, poky.watcher, randy.macleod, ross.burton, tim.orling
Version: 6.1   
Target Milestone: 6.0   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Yes (doc changes required)

Description niqingliang2003 2025-10-28 03:10:24 UTC
according to https://wiki.yoctoproject.org/wiki/How_do_I#Non-networked_Builds_and_Cached_Git_Respositories

the recipes should use 'SRCREV'

but currently, the oe-core/meta-openembedded are all using 'tag=${PV}', so it result in fetching failed on all recipes like this.

maybe we should give an option to use tag of premirror to avoid this problem,
before all recipes changed to use 'SRCREV'
Comment 1 niqingliang2003 2025-10-28 05:16:59 UTC
with BB_FETCH_PREMIRRORONLY and local git mirror repo.
Comment 2 Tim Orling 2025-10-30 14:43:21 UTC
You may need to refresh your premirror tarballs.

Can you provide an example recipe and the error you are seeing?
Comment 3 niqingliang2003 2025-11-05 07:45:15 UTC
my premirror is git repo, not tarball.

error info as following:

WARNING: /mnt/datum/dev/optimus/openembedded-core/../meta-openembedded/meta-oe/recipes-dbs/psqlodbc/psqlodbc_17.00.0006.bb: Exception during build_dependencies for fetcher_hashes_dummyfunc
WARNING: /mnt/datum/dev/optimus/openembedded-core/../meta-openembedded/meta-oe/recipes-dbs/psqlodbc/psqlodbc_17.00.0006.bb: Error during finalise of /mnt/datum/dev/optimus/openembedded-core/../meta-openembedded/meta-oe/recipes-dbs/psqlodbc/psqlodbc_17.00.0006.bb
WARNING: /mnt/datum/dev/optimus/openembedded-core/../meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad_2023.06.01.bb: Exception during build_dependencies for fetcher_hashes_dummyfunc
WARNING: /mnt/datum/dev/optimus/openembedded-core/../meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad_2023.06.01.bb: Error during finalise of /mnt/datum/dev/optimus/openembedded-core/../meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad_2023.06.01.bb
WARNING: /mnt/datum/dev/optimus/openembedded-core/../meta-openembedded/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.12.0.bb: Exception during build_dependencies for fetcher_hashes_dummyfunc
WARNING: /mnt/datum/dev/optimus/openembedded-core/../meta-openembedded/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.12.0.bb: Error during finalise of /mnt/datum/dev/optimus/openembedded-core/../meta-openembedded/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.12.0.bb
WARNING: /mnt/datum/dev/optimus/openembedded-core/../meta-openembedded/meta-oe/recipes-extended/sysdig/sysdig_0.28.0.bb: Exception during build_dependencies for fetcher_hashes_dummyfunc
WARNING: /mnt/datum/dev/optimus/openembedded-core/../meta-openembedded/meta-oe/recipes-extended/sysdig/sysdig_0.28.0.bb: Error during finalise of /mnt/datum/dev/optimus/openembedded-core/../meta-openembedded/meta-oe/recipes-extended/sysdig/sysdig_0.28.0.bb
WARNING: /mnt/datum/dev/optimus/openembedded-core/../meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-google-fira.bb: Exception during build_dependencies for fetcher_hashes_dummyfunc
WARNING: /mnt/datum/dev/optimus/openembedded-core/../meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-google-fira.bb: Error during finalise of /mnt/datum/dev/optimus/openembedded-core/../meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-google-fira.bb
WARNING: /mnt/datum/dev/optimus/openembedded-core/../meta-openembedded/meta-oe/recipes-support/avro/avro-c++_1.12.1.bb: Exception during build_dependencies for fetcher_hashes_dummyfunc
WARNING: /mnt/datum/dev/optimus/openembedded-core/../meta-openembedded/meta-oe/recipes-support/avro/avro-c++_1.12.1.bb: Error during finalise of /mnt/datum/dev/optimus/openembedded-core/../meta-openembedded/meta-oe/recipes-support/avro/avro-c++_1.12.1.bb
WARNING: /mnt/datum/dev/optimus/openembedded-core/../meta-openembedded/meta-oe/recipes-support/gosu/gosu_1.17.bb: Exception during build_dependencies for fetcher_hashes_dummyfunc
WARNING: /mnt/datum/dev/optimus/openembedded-core/../meta-openembedded/meta-oe/recipes-support/gosu/gosu_1.17.bb: Error during finalise of /mnt/datum/dev/optimus/openembedded-core/../meta-openembedded/meta-oe/recipes-support/gosu/gosu_1.17.bb
WARNING: /mnt/datum/dev/optimus/openembedded-core/../meta-openembedded/meta-oe/recipes-support/opencv/opencv_4.12.0.bb: Exception during build_dependencies for fetcher_hashes_dummyfunc
WARNING: /mnt/datum/dev/optimus/openembedded-core/../meta-openembedded/meta-oe/recipes-support/opencv/opencv_4.12.0.bb: Error during finalise of /mnt/datum/dev/optimus/openembedded-core/../meta-openembedded/meta-oe/recipes-support/opencv/opencv_4.12.0.bb
WARNING: /mnt/datum/dev/optimus/openembedded-core/../meta-openembedded/meta-oe/recipes-support/thin-provisioning-tools/thin-provisioning-tools_1.1.0.bb: Exception during build_dependencies for fetcher_hashes_dummyfunc
WARNING: /mnt/datum/dev/optimus/openembedded-core/../meta-openembedded/meta-oe/recipes-support/thin-provisioning-tools/thin-provisioning-tools_1.1.0.bb: Error during finalise of /mnt/datum/dev/optimus/openembedded-core/../meta-openembedded/meta-oe/recipes-support/thin-provisioning-tools/thin-provisioning-tools_1.1.0.bb
ERROR: ExpansionError during parsing /mnt/datum/dev/optimus/openembedded-core/../meta-openembedded/meta-oe/recipes-dbs/psqlodbc/psqlodbc_17.00.0006.bb
bb.data_smart.ExpansionError: Failure expanding variable fetcher_hashes_dummyfunc[vardepvalue], expression was ${@bb.fetch.get_hashvalue(d)} which triggered exception NetworkAccess: Network access disabled through BB_NO_NETWORK (or set indirectly due to use of BB_FETCH_PREMIRRORONLY) but access requested with command git -c gc.autoDetach=false -c core.pager=cat -c safe.bareRepository=all -c clone.defaultRemoteName=origin ls-remote https://github.com/postgresql-interfaces/psqlodbc.git  (for url https://github.com/postgresql-interfaces/psqlodbc.git)
The variable dependency chain for the failure is: fetcher_hashes_dummyfunc[vardepvalue]
Comment 4 Randy MacLeod 2025-11-06 16:00:53 UTC
Ross volunteered to review and comment.
Comment 5 Richard Purdie 2025-11-06 16:01:27 UTC
All recipes in oe-core and meta-openembedded should specify both a tag= and a SRCREV. There should be no tag= without a revision set.

As long as both are set, premirrors should work ok. We think there was just a badly written recipe in meta-oe and that should be fixed now. Are you still seeing issues?
Comment 6 Randy MacLeod 2025-11-06 16:02:06 UTC
bugzilla forced me to write this comment!
Comment 7 Ross Burton 2025-11-06 16:33:04 UTC
With current master for oe-core and meta-oe I can't replicate this: I think that one failure in psqlodbc was responsible.

Closing, if you still have problems please re-open: you've found bugs in recipes where the SRCREV isn't set.