Bug 12739

Summary: Fetcher for Git submodules ('gitsm') bypasses BB_NO_NETWORK checks
Product: [Build System, Metadata & Runtime] BitBake Reporter: Matt Hoosier <matt.hoosier>
Component: bitbakeAssignee: Richard Purdie <richard.purdie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: JPEWhacker, poky.bs.watcher, poky.watcher, randy.macleod
Version: unspecified   
Target Milestone: 2.6 M1   
Hardware: x86   
OS: Multiple   
Whiteboard: Backport to YP 2.4 and 2.5
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
Remember to copy fetched .git/modules into working copy clone
none
Remember to copy fetched .git/modules into working copy clone none

Description Matt Hoosier 2018-05-09 12:06:24 UTC
Created attachment 4298 [details]
Remember to copy fetched .git/modules into working copy clone

As a consequence of accidentally not propagating the .git/modules directory (the histories of the submodules) as downloaded during the do_fetch() task into the repo cloned into ${WORKDIR}, the do_unpack() task inadvertently performs a live fetch of each submodule listed in .gitmodules in order to satisfy the 'git submodule update --init --recursive' command executed during the unpack task.

The attached patch contains a proposes to fix the issue by propagating the .git/modules to the working copy clone.
Comment 1 Matt Hoosier 2018-05-09 14:34:26 UTC
Created attachment 4299 [details]
Remember to copy fetched .git/modules into working copy clone
Comment 2 Matt Hoosier 2018-05-10 03:53:00 UTC
Comment on attachment 4299 [details]
Remember to copy fetched .git/modules into working copy clone

Removed the patch attachment; it's submitted on bitbake-devel.