Created attachment 4429 [details] patch file for rocko-18.0.3 usehead works fine with a single git repo and without name parameter. In case of multiple git repos, name option is used in SRC_URI and error is raised. For instance when you have a recipe like that, PV = "1.0+git${SRCPV}" SRCREV_FORMAT = "fooa_foob" SRCREV_fooa = "${AUTOREV}" SRCREV_foob = "${AUTOREV}" SRC_URI = "\ git:///fooa_dir/;protocol=file;usehead=1;name=fooa;destsuffix=git/fooa \ git:///foob_dir/;protocol=file;usehead=1;name=foob;destsuffix=git/foob \ " build fail with error message bb.data_smart.ExpansionError: Failure expanding variable SRCPV, expression was ${@bb.fetch2.get_srcrev(d)} which triggered exception FetchError: Fetcher failure: Unable to resolve 'master' in upstream git repository in git ls-remote output for //fooa_dir/ because fetch operation is applied to wrong git reference, not 'HEAD' It is related to dictionary ud.unresolvedrev that is always using 'default' key instead of ud.name[0] when ud.usehead==1. I attach a patch file but I don't really know how to proceed. Do I really have to mail a patch to bitbake mailing list in this case. Only one line modified in one file. I found this bug in rocko version but it looks like it exists in later versions
I believe this was fixed with http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=10c69538c0cb8708c7eff9e8dc05ca7c669cb61c