Bug 6345 - gitsm.py doesn't seem to work as expected
Summary: gitsm.py doesn't seem to work as expected
Status: RESOLVED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Undecided normal
Target Milestone: ---
Assignee: Richard Purdie
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2014-05-18 01:44 UTC by Chris Morgan
Modified: 2014-05-19 12:56 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

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