Bug 5525 - gitsm.py fetcher requires git version > version 1.8.5
Summary: gitsm.py fetcher requires git version > version 1.8.5
Status: RESOLVED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: 1.4
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.6
Assignee: Paul Eggleton
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2013-11-13 21:10 UTC by Glenn Schmottlach
Modified: 2014-02-28 15: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
Yocto IRC log where problem was discussed. (2.51 KB, text/x-log)
2013-11-13 21:10 UTC, Glenn Schmottlach
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Glenn Schmottlach 2013-11-13 21:10:59 UTC
Created attachment 1621 [details]
Yocto IRC log where problem was discussed.

The Git submodule fetcher (gitsm.py) has a dependency on the version of Git installed on the development platform. Specifically it requires a version of Git that includes this patch (https://github.com/git/git/commit/d75219b).

The problem is that versions of Git prior to the patch has absolute paths hard-coded into each .git/modules/<mod_name>/config file (see "worktree" variable). The gitsm.py fetcher copies the modules directory from the repo in the downloads directory to the work directory before doing a "git submodule update" that subsequently fails in "unpack()" since this original temp repo is removed as the last statement of "update_submodules()".

Either everyone needs to be aware of this dependency or the fetcher needs to be modified to correct each module's config file (e.g. "worktree" variable) if the version of Git installed does not contain the above patch. Right now, Ubuntu 12.04 (LTS) is only using Git 1.7.9.5 so it will fail fetching using this fetcher.

This has been discussed on the Yocto IRC where it was discovered and independently confirmed. I've attached the transcript.
Comment 1 Paul Eggleton 2014-02-28 15:18:45 UTC
Fix merged to master:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=957c9a80bc698845475591912c8cb6ae42077d19

I've also added a test for the gitsm fetcher to bitbake-selftest.