When working on a recent package, an invalid git URI did NOT trigger a failure during the do_fetch processing. Running the command by hand had git return a non-zero return code and an error message.... however bitbake happily continues on and pretends everything worked properly, until the unpack fails later. (By this point the fetch stamp has been created, so subsequent tries will keep failing at unpack!)
Oh, that's not good at all. This is fairly trivial to fix by adding some special casing to runfetchcmd(), but I'm not a big fan of special casing so posting a patch here while I ponder it a bit more.
Created attachment 49 [details] A simple patch which adds special-casing to runfetchcmd()
Comment on attachment 49 [details] A simple patch which adds special-casing to runfetchcmd() This patch is bogus as I misread the bug report...
I finally figured this out; when I introduced the new mirror code to bb.fetch.go() I used an exception raised by the sources fetcher method to determine whether the mirrors should be tried, however the exception was swallowed so if the mirror fetch failed no error was triggered. I've implemented a patch on my branch which saves the exception and re-raises it if the mirror fetching code fails. http://git.pokylinux.org/cgit/cgit.cgi/poky-contrib/commit/?h=josh/master&id=e778a529c9ffc2daea1bdd910bffc0bb835d4775
I've verified this DOES fix the problem I observed.
Josh fixed in his branch
I just merged a slightly modified version of the patch from my branch to master: 0ee7a9e6bdce1f3094e831b9db83087fff1dad17
Mark verified Josh's fix