AOSP回购同步花费的时间太长 [英] AOSP repo sync takes too long

查看:111
本文介绍了AOSP回购同步花费的时间太长的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从同名书籍中学习Embedded Android.并且作者建议与AOSP姜饼分支合作.因此,我随后下载了源代码:

I'm trying to learn Embedded Android from the book with the same name. And the author suggested working with AOSP gingerbread branch. So I followed to download the source:

$ repo init -u https://android.googlesource.com/platform/manifest.git
-b gingerbread

$ repo sync

但是时间太长了.同样从输出中,在我看来,它似乎也在从其他分支(我看到的是android-5 ....)下载源代码,这不是我想要的.我想知道这是否就是为什么要花这么长时间的原因.

But it's taking too long. Also from the output, it seems to me like it's also downloading source code from other branches (I see android-5.....) which is not what I want. I'm wondering if that's the reason why it takes so long.

有人遇到过同样的问题吗?请给我一个建议!谢谢!

Has anybody had the same problem? Please give me a suggestion! Thanks!

推荐答案

AOSP 是一个数千兆字节的下载,因此您无能为力.但是,将-c/--current-branch选项传递给repo sync会使Repo告诉Git仅获取您真正需要的分支,而不是每个存储库的所有分支.对于像Gingerbread这样的旧版本,从理论上讲,这应该是非常有益的.但是,Repo使用通过HTTP下载的Git捆绑包为存储库播种,并且捆绑包文件不受-c选项的影响.使用--no-clone-bundle禁用捆绑文件.因此,以下Repo命令应产生最小的下载量:

AOSP is a multi-gigabyte download so there's not that much you can do. However, passing the -c/--current-branch option to repo sync causes Repo to tell Git to only fetch the branch you really need instead of all branches of each repository. With an old release like Gingerbread this should theoretically be quite beneficial. However, Repo seeds the repositories with Git bundles that it downloads via HTTP, and the bundle files aren't affected by the -c option. Using --no-clone-bundle disables the bundle files. Hence the following Repo command should yield the smallest download:

repo sync -c --no-clone-bundle

(请记住,Gingerbread发行已经有好几年了.在许多最新的硬件上都无法立即使用.)

(Keep in mind that Gingerbread is a several year old release. It won't work out of the box on a lot of recent hardware.)

这篇关于AOSP回购同步花费的时间太长的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆