I am trying to test out using repo
, but it does not seem to work very well for me. If I run repo init -u https://android.googlesource.com/platform/manifest
then I get the following output:
[localhost] 10:03 $ REPO_TRACE=1 repo init -u https://android.googlesource.com/platform/manifest
: python3.6 /home/simonrose/bin/repo init -u https://android.googlesource.com/platform/manifest
: git --version
Downloading Repo source from https://gerrit.googlesource.com/git-repo
: git init --quiet
: git config remote.origin.url https://gerrit.googlesource.com/git-repo
: git config remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
: git config --get-regexp url.*.insteadof
: git fetch --quiet /home/simonrose/data/git/repo-test/.repo/repo/.git/clone.bundle +refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/tags/*
: git fetch --quiet --progress origin +refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/tags/*
: git rev-parse --verify refs/remotes/origin/stable^{commit}
: git describe 60fc51bb1dcf8970189a544c2ca75f2cdcfdb6f8
: git tag -v v2.8
: git update-ref refs/heads/default v2.8^0
: git config branch.default.remote origin
: git config branch.default.merge refs/heads/stable
: git symbolic-ref HEAD refs/heads/default
: git read-tree --reset -u -v HEAD
: /usr/bin/python3.6 /home/simonrose/data/git/repo-test/.repo/repo/main.py --repo-dir=/home/simonrose/data/git/repo-test/.repo --wrapper-version=2.8 --wrapper-path=/home/simonrose/bin/repo -- init -u https://android.googlesource.com/platform/manifest
: git --version
: parsing /home/simonrose/.gitconfig
Downloading manifest from https://android.googlesource.com/platform/manifest
: export GIT_DIR=/home/simonrose/data/git/repo-test/.repo/manifests.git
: git init 1>| 2>|
: git config --file /home/simonrose/data/git/repo-test/.repo/manifests.git/config --includes --null --list 1>| 2>|
: git config --file /home/simonrose/data/git/repo-test/.repo/manifests.git/config --includes --replace-all filter.lfs.smudge git-lfs smudge --skip -- %f 1>| 2>|
: git config --file /home/simonrose/data/git/repo-test/.repo/manifests.git/config --includes --replace-all filter.lfs.process git-lfs filter-process --skip 1>| 2>|
: git config --file /home/simonrose/data/git/repo-test/.repo/manifests.git/config --includes --unset-all core.bare 1>| 2>|
: git config --file /home/simonrose/data/git/repo-test/.repo/manifests.git/config --includes --replace-all remote.origin.url https://android.googlesource.com/platform/manifest 1>| 2>|
: git config --file /home/simonrose/data/git/repo-test/.repo/manifests.git/config --includes --replace-all remote.origin.fetch +refs/heads/*:refs/remotes/origin/* 1>| 2>|
curl --fail --output /home/simonrose/data/git/repo-test/.repo/manifests.git/clone.bundle.tmp --netrc --location https://android.googlesource.com/platform/manifest/clone.bundle
: git fetch --quiet --progress /home/simonrose/data/git/repo-test/.repo/manifests.git/clone.bundle +refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/tags/* 1>| 2>|
Receiving objects: 100% (78461/78461), 58.02 MiB | 25.86 MiB/s, done.
Resolving deltas: 100% (23276/23276), done.
: git fetch --quiet --progress origin --tags +refs/heads/*:refs/remotes/origin/* +refs/heads/master:refs/remotes/origin/master +refs/tags/*:refs/tags/* 1>| 2>&1
remote: Counting objects: 2, done
remote: Finding sources: 100% (119/119)
remote: Total 119 (delta 35), reused 110 (delta 35)
Receiving objects: 100% (119/119), 418.92 KiB | 906.00 KiB/s, done.
Resolving deltas: 100% (35/35), completed with 11 local objects.
: git rev-parse --verify refs/remotes/origin/master^0 1>| 2>|
: cd /home/simonrose/data/git/repo-test/.repo/manifests
: git read-tree --reset -u -v HEAD 1>| 2>|
fatal: not a git repository (or any parent up to mount point /home/simonrose)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
Traceback (most recent call last):
File "/home/simonrose/data/git/repo-test/.repo/repo/main.py", line 628, in <module>
_Main(sys.argv[1:])
File "/home/simonrose/data/git/repo-test/.repo/repo/main.py", line 602, in _Main
result = run()
File "/home/simonrose/data/git/repo-test/.repo/repo/main.py", line 595, in <lambda>
run = lambda: repo._Run(name, gopts, argv) or 0
File "/home/simonrose/data/git/repo-test/.repo/repo/main.py", line 264, in _Run
result = cmd.Execute(copts, cargs)
File "/home/simonrose/data/git/repo-test/.repo/repo/subcmds/init.py", line 524, in Execute
self._SyncManifest(opt)
File "/home/simonrose/data/git/repo-test/.repo/repo/subcmds/init.py", line 334, in _SyncManifest
m.Sync_LocalHalf(syncbuf, submodules=opt.submodules)
File "/home/simonrose/data/git/repo-test/.repo/repo/project.py", line 1623, in Sync_LocalHalf
self._InitWorkTree(force_sync=force_sync, submodules=submodules)
File "/home/simonrose/data/git/repo-test/.repo/repo/project.py", line 3135, in _InitWorkTree
raise GitError('Cannot initialize work tree for ' + self.name)
error.GitError: Cannot initialize work tree for manifests
I can see what appears to be the problematic line:
fatal: not a git repository (or any parent up to mount point /home/simonrose)
If I switch into the directory .repo/manifests
however, it is a git repository, but with all of the files deleted for some reason.
If I run repo --version
then I get the following:
[localhost] 10:08 $ repo --version
repo version v2.8
(from https://gerrit.googlesource.com/git-repo)
(Thu, 21 May 2020 22:46:11 +0000)
repo launcher version 2.8
(from /home/simonrose/bin/repo)
(currently at 2.8)
repo User-Agent git-repo/2.8 (Linux) git/2.24.2 Python/3.6.8
git 2.24.2
git User-Agent git/2.24.2 (Linux) git-repo/2.8
Python 3.6.8 (default, Aug 7 2019, 17:28:10)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
OS Linux 3.10.0-1062.9.1.el7.x86_64 (#1 SMP Fri Dec 6 15:49:49 UTC 2019)
CPU x86_64 (x86_64)
So what gives? This seems to be very strange behaviour, that repo gives an error and only partially initializes the repository.
(I have also tested this with python 2.7.5 and I get the same error)
Postscript:
Note that if I then re-run repo init
after this error, I get the error
[localhost] 10:08 $ repo init
fatal: manifest 'default.xml' not available
fatal: manifest default.xml not found
If I then go into .repo/manifests
and undelete (i.e. unstage and checkout) default.xml, then repo init works just fine. However, repo sync
then has a similar problem when checking out repositories...