3

我试图用 local_manifest.xml 文件配置 repo,以获取金鱼 Android 内核,网址为: https ://android.googlesource.com/kernel/goldfish.git

我已经编写了以下在 .repo/manifests/local_manifest.xml 中复制的 local_manifest.xml 文件:

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote
    name="linux-kernel"
    fetch="https://android.googlesource.com/kernel" />
<project
    path="kernel"
    name="goldfish"
    remote="linux-kernel"
    revision="android-goldfish-3.10" />
</manifest>

给出以下命令: repo init -u local_manifest.xml

我收到以下错误消息:

fatal: Invalid gitfile format: local_manifest.xml
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

我相信我的 local_manifest.xml 文件中有问题,但我无法理解问题所在。关于什么是错的任何想法?

此外,如何将本地清单与 repo 一起使用?

谢谢你。

4

1 回答 1

2

本地清单不打算用作您的主要清单,而是对默认/标准清单的扩充。您只需将 xml 文件添加$TOP_DIR/.repo/local_manifests$TOP_DIR/.repo/local_manifests/kernel_manifest.xml.

清单本身遵循标准格式,允许您提供新的服务器(远程)和项目。尝试将现有的修改为如下所示:

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
    <remote
         name="linux-kernel"
         fetch="https://android.googlesource.com/" />

    <project
        path="kernel"
        name="kernel/goldfish"
        remote="linux-kernel"
        revision="android-goldfish-3.10" />
</manifest>

当您执行 时repo sync,repo 应自动加载此清单并将其用作同步的一部分。有关更多详细信息和其他好东西,请看这里

于 2015-12-30T21:52:33.360 回答