Bug 362 - When do_fetch attempts to pull from a "git" source, a failure is not detected
Summary: When do_fetch attempts to pull from a "git" source, a failure is not detected
Status: VERIFIED FIXED
Alias: None
Product: Meta-yocto
Classification: Build System, Metadata & Runtime
Component: meta-yocto (show other bugs)
Version: 0.9
Hardware: x86 Multiple
: High major
Target Milestone: 0.9 M4
Assignee: Joshua Lock - Disabled
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2010-09-29 14:16 UTC by Mark Hatle
Modified: 2010-12-21 06:07 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified: Program Management
Documentation change: ---


Attachments
A simple patch which adds special-casing to runfetchcmd() (1.06 KB, patch)
2010-09-30 09:36 UTC, Joshua Lock - Disabled
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Hatle 2010-09-29 14:16:21 UTC
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!)
Comment 1 Joshua Lock - Disabled 2010-09-30 09:36:19 UTC
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.
Comment 2 Joshua Lock - Disabled 2010-09-30 09:36:56 UTC
Created attachment 49 [details]
A simple patch which adds special-casing to runfetchcmd()
Comment 3 Joshua Lock - Disabled 2010-09-30 09:54:28 UTC
Comment on attachment 49 [details]
A simple patch which adds special-casing to runfetchcmd()

This patch is bogus as I misread the bug report...
Comment 4 Joshua Lock - Disabled 2010-10-05 06:05:59 UTC
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
Comment 5 Mark Hatle 2010-10-05 08:24:54 UTC
I've verified this DOES fix the problem I observed.
Comment 6 Jessica 2010-10-05 08:29:11 UTC
Josh fixed in his branch
Comment 7 Joshua Lock - Disabled 2010-10-05 08:57:34 UTC
I just merged a slightly modified version of the patch from my branch to master:
0ee7a9e6bdce1f3094e831b9db83087fff1dad17
Comment 8 Jessica 2010-10-05 09:38:33 UTC
Mark verified Josh's fix