简体   繁体   English

如何在 Yocto 中以递归方式克隆 git repo 及其子模块

[英]How to clone a git repo with its submodules recursively in Yocto

Is there any other way to clone all the dependent folders in a Bitbake recipe file (similar to using recursive tag)?有没有其他方法可以克隆 Bitbake 配方文件中的所有依赖文件夹(类似于使用递归标签)? I'm currently doing it as below:我目前正在这样做:

SRC_URI="git://[uri_a];...;name=a \
     git://[uri_b];...;destsuffix=git/a/b;name=b \
     git://[uri_c];...;destsuffix=git/a/b/c;name=c"

where "b" & "c" are sub modules of "a".其中“b”和“c”是“a”的子模块。

You have你有

gitsm:// 

You use it the same way that你使用它的方式与

git://

For more information, you can read about it here: http://www.yoctoproject.org/docs/latest/bitbake-user-manual/bitbake-user-manual.html#gitsm-fetcher有关更多信息,您可以在此处阅读: http : //www.yoctoproject.org/docs/latest/bitbake-user-manual/bitbake-user-manual.html#gitsm-fetcher

After trying gitsm without success, I manually prepended the fetching of the submodules to the configure step:在尝试gitsm没有成功后,我手动将子模块的获取添加到配置步骤:

do_configure_prepend() {
  cd ${WORKDIR}/git
  git submodule update --init --recursive
}

Note: the same restrictions as gitsm apply, ie:注意:与gitsm相同的限制适用,即:

The Git Submodules fetcher is not a complete fetcher implementation. Git Submodules fetcher 不是一个完整的 fetcher 实现。 The fetcher has known issues where it does not use the normal source mirroring infrastructure properly. fetcher 存在一些已知问题,即它没有正确使用正常的源镜像基础设施。 Further, the submodule sources it fetches are not visible to the licensing and source archiving infrastructures.此外,它获取的子模块源对许可和源归档基础结构不可见。

Following the description above (from mr_georg) worked in most cases but failed on a recipe for a qt5 application.按照上面的描述(来自 mr_georg)在大多数情况下都有效,但在 qt5 应用程序的配方上失败。 With the below modification, the recipe worked:通过以下修改,配方有效:

do_configure_prepend() {
  cd ${WORKDIR}/git
  git submodule update --init --recursive
  cd -
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM