Bug 7558 - Wrong URL in git fetcher's checkstatus method
Summary: Wrong URL in git fetcher's checkstatus method
Status: VERIFIED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.9
Assignee: Richard Purdie
QA Contact: Bogdan Alexandru Voiculescu
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2015-04-02 12:48 UTC by Marcin Smoczyński
Modified: 2015-10-13 13:18 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
Proposed patch (886 bytes, patch)
2015-04-02 12:48 UTC, Marcin Smoczyński
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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