Bug 7558

Summary: Wrong URL in git fetcher's checkstatus method
Product: [Build System, Metadata & Runtime] BitBake Reporter: Marcin Smoczyński <smoczynski.marcin>
Component: bitbakeAssignee: Richard Purdie <richard.purdie>
Status: VERIFIED FIXED QA Contact: Bogdan Alexandru Voiculescu <bogdanx.a.voiculescu>
Severity: normal    
Priority: Medium CC: bogdanx.a.voiculescu, poky.bs.watcher, poky.watcher
Version: unspecified   
Target Milestone: 1.9   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
Proposed patch none

Description Marcin Smoczyński 2015-04-02 12:48:37 UTC
Created attachment 2464 [details]
Proposed patch

Executing checkuri on a rule with git repository in SRC_URI does not report errors when working offline because wrong repository url is passed to the ls-remote command. For example "bitbake -c checkuri glibc" command executes:
"git -c core.fsyncobjectfiles=0 ls-remote git://sourceware.org/git/glibc.git;branch=release/2.21/master"
command in a shell subprocess to determine if url is valid. Shell subprocess executes in fact 2 commands:
"git -c core.fsyncobjectfiles=0 ls-remote git://sourceware.org/git/glibc.git"
and
"branch=release/2.21/master"

First one returns 127 or 128 depending on error but second one returns 0 because it is just env variable setup. Therefore we're not catching connection error. 

To reproduce:
Go offline and execute bitbake -c checkuri glibc
no error will be reported

To fix:
pass proper repository url without arguments after a semicolon. Proposed patch in an attachment.
Comment 2 Bogdan Alexandru Voiculescu 2015-10-13 13:18:46 UTC
Verified on master d302c98822efe2cb78a63b620aed1b94b4ed4a68
using this command with network enabled and disabled: 
bitbake -c checkuri m4