alibaba / git-repo-go

git-repo is a command-line tool for centralized workflow, can work with Gerrit, AGit-Flow compatible servers. It is written in Golang, and it can be installed easily without further dependency. It provides an easy-to-use solution for multiple repositories which is introduced by Android repo first, and it can also work with a single repository.
https://git-repo.info/
Apache License 2.0
260 stars 59 forks source link

manifest.xml 中 include 的相对路径计算有问题。 #56

Open icemanpro opened 1 year ago

icemanpro commented 1 year ago

用 repo 时 repo init --no-clone-bundle --repo-url https://gitlab.com/firefly-linux/git-repo.git -u https://gitlab.com/firefly-linux/manifests.git -b master -m rk3288_linux_release.xml

repo sync -c --no-tags 正常。

用 git-repo 时 git-repo init --no-clone-bundle -u https://gitlab.com/firefly-linux/manifests.git -b master -m rk3288_linux_release.xml git-repo sync -c --no-tags

报错: FATAL: stat /home/firefly/proj/rk3288_linux_release_v2.5.0a_20230510/.repo/rk3288/rk3288_linux_bsp_release_20220304_v2.5.0a.xml: no such file or directory

mamh2021 commented 7 months ago

把你的 manifest xml 贴出来啊。

socyno commented 7 months ago

不能以当前要解析的文件所在目录作为 include 文件的目录,在 include 嵌套场景下与 google repo 的行为不一致, image

Mupceet commented 5 months ago

同样的问题,我通过以下命令下载:

git repo init -u https://gitee.com/openharmony/manifest.git -b master

.repo 目录中为:manifest.xml manifests manifests.git

其中 manifest.xml 为:

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
  <remote fetch="." name="origin" review="https://openharmony.gitee.com/openharmony/"/>
  <default remote="origin" revision="master" sync-j="4" />

  <include name="ohos/ohos.xml" />
  <include name="chipsets/all.xml" />
</manifest>

执行: git repo sync -c 报错如下:

FATAL: stat /home/mupceet/openharmony/.repo/ohos/ohos.xml: no such file or directory

原因看起来就是如 @socyno 所述。

CharlesJin6 commented 3 months ago

同样的问题,我通过以下命令下载:

git repo init -u https://gitee.com/openharmony/manifest.git -b master

.repo 目录中为:manifest.xml manifests manifests.git

其中 manifest.xml 为:

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
  <remote fetch="." name="origin" review="https://openharmony.gitee.com/openharmony/"/>
  <default remote="origin" revision="master" sync-j="4" />

  <include name="ohos/ohos.xml" />
  <include name="chipsets/all.xml" />
</manifest>

执行: git repo sync -c 报错如下:

FATAL: stat /home/mupceet/openharmony/.repo/ohos/ohos.xml: no such file or directory

原因看起来就是如 @socyno 所述。

确实存在这个问题,它的相对位置不是manifests文件夹内,而是manifests外。