Bug 6345

Summary: gitsm.py doesn't seem to work as expected
Product: [Build System, Metadata & Runtime] BitBake Reporter: Chris Morgan <chmorgan>
Component: bitbakeAssignee: Richard Purdie <richard.purdie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Undecided CC: poky.bs.watcher, poky.watcher
Version: unspecified   
Target Milestone: ---   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Chris Morgan 2014-05-18 01:44:58 UTC
Trying to use gitsm to fetch a git repo with submodules and seeing:

bitbucket.org.<account>.<project>.git/modules /home/cmorgan/projects/yocto_poky/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/<application>/git-r0/git//.git/
DEBUG: Python function base_do_unpack finished
DEBUG: Python function do_unpack finished
ERROR: Function failed: Fetcher failure: Fetch command failed with exit code 1, output:
cp: cannot stat '/home/cmorgan/projects/yocto_poky/build/downloads/git2/bitbucket.org.<account>.<project>.git/modules': No such file or directory


Looking at this output directory I see:

$ ls -a
.  ..  branches  config  description  HEAD  hooks  info  objects
packed-refs  refs


So there doesn't appear to be a modules directory even though this repository has submodules.
Comment 1 Chris Morgan 2014-05-18 15:56:49 UTC
I was in the process of creating a recipe and a test repository on github (which has the same syntax as bitbucket) and my test case didn't reproduce. I ran:

bitbake -c clean mybitbucketrecipe and then

bitbake mybitbucketrecipe

and it works.

I suspect the issue is that I had originally used a git:// path and then switched to a gitsm:// path without cleaning in between.

Does this make sense? I ran a few times cleaning and rebuilding and it looks like everything is good now so I'm inclined to say so...
Comment 2 Chris Morgan 2014-05-19 12:56:29 UTC
Marking as resolved. I was able to get patches in to improve the gitsm:// fetcher documentation and testing here indicates that everything is working as expected with gitsm://.