my coworker who is new to bitbake was writing a recipe and it didn't work. we discovered that a typo in SRC_URL will lead to bitbake exploding with an obtuse error and will also create a bunch of directories in $PWD that are named after code fragments from bbclasses. i think this situation can probably be improved so that other people aren't scratching their heads when this happens. repro recipe at the bottom. mischief@beast:~/src/poky $ bitbake x-native WARNING: Host distribution "gentoo-2.14" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution. Loading cache: 100% |################################################################################################################################################################| Time: 0:00:00 Loaded 3065 entries from dependency cache. Parsing recipes: 100% |##############################################################################################################################################################| Time: 0:00:00 Parsing of 1814 .bb files complete (1813 cached, 1 parsed). 3066 targets, 89 skipped, 0 masked, 0 errors. NOTE: Resolving any missing task queue dependencies Build Configuration: BB_VERSION = "2.4.0" BUILD_SYS = "x86_64-linux" NATIVELSBSTRING = "universal" TARGET_SYS = "x86_64-poky-linux" MACHINE = "qemux86-64" DISTRO = "poky" DISTRO_VERSION = "4.2.3" TUNE_FEATURES = "m64 core2" TARGET_FPU = "" meta meta-poky meta-yocto-bsp = "mickledore:6c3c62ebc171e16a45f55f276a83a32db075794e" meta-oe = "mickledore:57c516973978ca2667339bf1aae7dc722b5bcac7" Initialising tasks: 100% |###########################################################################################################################################################| Time: 0:00:00 Sstate summary: Wanted 99 Local 9 Mirrors 83 Missed 7 Current 20 (92% match, 94% complete) NOTE: Executing Tasks ERROR: x-native-1.0+${SRCPV}-r0 do_populate_lic: Error executing a python function in exec_func_python() autogenerated: The stack trace of python calls that resulted in this exception/failure was: File: 'exec_func_python() autogenerated', lineno: 2, function: <module> 0001: *** 0002:sstate_hardcode_path(d) 0003: File: '/home/mischief/src/poky/meta/classes-global/sstate.bbclass', lineno: 654, function: sstate_hardcode_path 0650: bb.note("Removing hardcoded paths from sstate package: '%s'" % (sstate_hardcode_cmd)) 0651: subprocess.check_output(sstate_hardcode_cmd, shell=True, cwd=sstate_builddir) 0652: 0653: # If the fixmefn is empty, remove it.. *** 0654: if os.stat(fixmefn).st_size == 0: 0655: os.remove(fixmefn) 0656: else: 0657: bb.note("Replacing absolute paths in fixmepath file: '%s'" % (sstate_filelist_relative_cmd)) 0658: subprocess.check_output(sstate_filelist_relative_cmd, shell=True) Exception: FileNotFoundError: [Errno 2] No such file or directory: '/home/mischief/src/poky/build/tmp/work/core2-64-poky-linux/x-native/1.0+${SRCPV}-r0/sstate-build-populate_lic/fixmepath' ERROR: Logfile of failure stored in: /home/mischief/src/poky/build/tmp/work/core2-64-poky-linux/x-native/1.0+${SRCPV}-r0/temp/log.do_populate_lic.1507434 ERROR: Task (/home/mischief/src/poky/meta/recipes-devtools/x/x-native.bb:do_populate_lic) failed with exit code '1' ERROR: x-native-1.0+${SRCPV}-r0 do_deploy_source_date_epoch: Error executing a python function in exec_func_python() autogenerated: The stack trace of python calls that resulted in this exception/failure was: File: 'exec_func_python() autogenerated', lineno: 2, function: <module> 0001: *** 0002:sstate_hardcode_path(d) 0003: File: '/home/mischief/src/poky/meta/classes-global/sstate.bbclass', lineno: 654, function: sstate_hardcode_path 0650: bb.note("Removing hardcoded paths from sstate package: '%s'" % (sstate_hardcode_cmd)) 0651: subprocess.check_output(sstate_hardcode_cmd, shell=True, cwd=sstate_builddir) 0652: 0653: # If the fixmefn is empty, remove it.. *** 0654: if os.stat(fixmefn).st_size == 0: 0655: os.remove(fixmefn) 0656: else: 0657: bb.note("Replacing absolute paths in fixmepath file: '%s'" % (sstate_filelist_relative_cmd)) 0658: subprocess.check_output(sstate_filelist_relative_cmd, shell=True) Exception: FileNotFoundError: [Errno 2] No such file or directory: '/home/mischief/src/poky/build/tmp/work/core2-64-poky-linux/x-native/1.0+${SRCPV}-r0/sstate-build-deploy_source_date_epoch/fixmepath' ERROR: Logfile of failure stored in: /home/mischief/src/poky/build/tmp/work/core2-64-poky-linux/x-native/1.0+${SRCPV}-r0/temp/log.do_deploy_source_date_epoch.1507433 ERROR: Task (/home/mischief/src/poky/meta/recipes-devtools/x/x-native.bb:do_deploy_source_date_epoch) failed with exit code '1' NOTE: Tasks Summary: Attempted 510 tasks of which 504 didn't need to be rerun and 2 failed. Summary: 2 tasks failed: /home/mischief/src/poky/meta/recipes-devtools/x/x-native.bb:do_populate_lic /home/mischief/src/poky/meta/recipes-devtools/x/x-native.bb:do_deploy_source_date_epoch Summary: There was 1 WARNING message. Summary: There were 2 ERROR messages, returning a non-zero exit code. mischief@beast:~/src/poky $ ls '!=' contrib LICENSE Makefile meta-poky oe-init-build-env ''\''patches'\'')}' README.poky.md tools '${@d.getVar('\''S'\'')' documentation LICENSE.GPL-2.0-only MEMORIAM meta-selftest 'os.path.join('\''' README.hardware.md README.qemu.md bitbake else LICENSE.MIT meta meta-skeleton 'os.path.normpath(d.getVar('\''S'\''))' README.md scripts build if MAINTAINERS.md meta-openembedded meta-yocto-bsp 'os.path.normpath(d.getVar('\''WORKDIR'\''))' README.OE-Core.md SECURITY.md mischief@beast:~/src/poky $ cat meta/recipes-devtools/x/x-native.bb SUMMARY = "broken" HOMEPAGE = "https://github.com/" LICENSE = "CLOSED" SRC_URL = "git://gist.github.com/mischief/74d8d99ca3b6c299242717a05af1401b.git;protocol=https" SRCREV = "${AUTOREV}" PV:append = "+${SRCPV}" INHIBIT_DEFAULT_DEPS = "1" S = "${WORKDIR}/git" mischief@beast:~/src/poky $
This issue is not caused by SRC_URI => SRC_URL typo directly (to be honest I made same mistake in the past). Nevertheless this was fixed in 62afa02d01794376efab75623f42e7e08af08526 (oe-core a8e7b0f932b9ea69b3a218fca18041676c65aba0 ) commit 62afa02d01794376efab75623f42e7e08af08526 Author: Richard Purdie <richard.purdie@linuxfoundation.org> Date: Fri Aug 11 13:52:59 2023 +0100 base/package: Move source revision information from PV to PKGV
Reopen the bug because it was not fixed but masked by mentioned commit.
FYI, the commit 62afa02d01794376efab75623f42e7e08af08526 was also mentioned as a fix for #14918 (See https://bugzilla.yoctoproject.org/show_bug.cgi?id=14918#c2) Though it look like a coincidence, I thought it would be better to mention it.
Should be fixed in https://git.openembedded.org/bitbake/commit/?id=e91c256ec076e70cf8a18e369fe7862e50618c48
Test case https://git.openembedded.org/openembedded-core-contrib/commit/?h=abelloni/master-next&id=a717508c54954ec22dd40d7fe314bd9a83a85c8f