2016/9/23

repo sync fail: unable to read sha1 file of ...

error: unable to read sha1 file of gradle-1.4-all.zip (25ee925013e572af4735884757af1e2228c103b0)
Traceback (most recent call last):
  File "/home/charles-chang/px3sdk_raw/.repo/repo/main.py", line 500, in 
    _Main(sys.argv[1:])
  File "/home/charles-chang/px3sdk_raw/.repo/repo/main.py", line 476, in _Main
    result = repo._Run(argv) or 0
  File "/home/charles-chang/px3sdk_raw/.repo/repo/main.py", line 155, in _Run
    result = cmd.Execute(copts, cargs)
  File "/home/charles-chang/px3sdk_raw/.repo/repo/subcmds/sync.py", line 675, in Execute
    project.Sync_LocalHalf(syncbuf)
  File "/home/charles-chang/px3sdk_raw/.repo/repo/project.py", line 1170, in Sync_LocalHalf
    self._InitWorkTree()
  File "/home/charles-chang/px3sdk_raw/.repo/repo/project.py", line 2230, in _InitWorkTree
    raise GitError("cannot initialize work tree")
error.GitError: cannot initialize work tree
可能是因為常常Ctrl-C 來中斷/resume repo sync , 所以最後 repo sync checkout 的時候, git 內容有錯了。

無稐怎樣 gc, fsck, 都沒辦法修復。
單獨,參考 manifest.xml 的 gradle project 去 clone 出來,checkout 也 OK

所以,只好...到 .repo/ 下 search 所以 gradl*:
有關的是:
./projects/tools/external/gradle.git
./project-objects/platform/tools/external/gradle.git

把這兩個刪掉。
整個 bsp 也刪掉,留下 .repo 這個 folder

然後再做 repo sync..就 OK了

沒有留言:

張貼留言