android 소스 동기화 오류

3145 단어

문제 설명


Repo sync 동기화 android 소스(JZO54L)를 처음 실행할 때 다음과 같이 나타납니다.
Syncing work tree:  51% (150/293)  error: unknown object type 0 at offset 1112285 in .git/objects/pack/pack-3dccdbf2aeeb0df599ca5b3fee5350792195400a.pack fatal: packed object 881c2ee8b85886db32ad1276c20e7ac7d72b98ef (stored in .git/objects/pack/pack-3dccdbf2aeeb0df599ca5b3fee5350792195400a.pack) is corrupt Traceback (most recent call last):   File "/media/zhou/LI/Android/JZO54L/.repo/repo/main.py", line 531, in     _Main(sys.argv[1:])   File "/media/zhou/LI/Android/JZO54L/.repo/repo/main.py", line 507, in _Main     result = repo._Run(argv) or 0   File "/media/zhou/LI/Android/JZO54L/.repo/repo/main.py", line 180, in _Run     result = cmd.Execute(copts, cargs)   File "/media/zhou/LI/Android/JZO54L/.repo/repo/subcmds/sync.py", line 821, in Execute     project.Sync_LocalHalf(syncbuf, force_sync=opt.force_sync)   File "/media/zhou/LI/Android/JZO54L/.repo/repo/project.py", line 1327, in Sync_LocalHalf     self._InitWorkTree(force_sync=force_sync)   File "/media/zhou/LI/Android/JZO54L/.repo/repo/project.py", line 2486, in _InitWorkTree     raise GitError("cannot initialize work tree") error.GitError: cannot initialize work tree

솔루션


실행
$ repo --trace sync -cdf

명령줄은 아래 섹션이 나타날 때까지 계속 인쇄됩니다.
: cd/media/zhou/LI/Android/JZO54L/external/srec : git read-tree --reset -u -v HEAD 1>| 2>| error: unknown object type 0 at offset 1112285 in .git/objects/pack/pack-3dccdbf2aeeb0df599ca5b3fee5350792195400a.pack fatal: packed object 881c2ee8b85886db32ad1276c20e7ac7d72b98ef (stored in .git/objects/pack/pack-3dccdbf2aeeb0df599ca5b3fee5350792195400a.pack) is corrupt Traceback (most recent call last):   File "/media/zhou/LI/Android/JZO54L/.repo/repo/main.py", line 531, in     _Main(sys.argv[1:])   File "/media/zhou/LI/Android/JZO54L/.repo/repo/main.py", line 507, in _Main     result = repo._Run(argv) or 0   File "/media/zhou/LI/Android/JZO54L/.repo/repo/main.py", line 180, in _Run     result = cmd.Execute(copts, cargs)   File "/media/zhou/LI/Android/JZO54L/.repo/repo/subcmds/sync.py", line 821, in Execute     project.Sync_LocalHalf(syncbuf, force_sync=opt.force_sync)   File "/media/zhou/LI/Android/JZO54L/.repo/repo/project.py", line 1327, in Sync_LocalHalf     self._InitWorkTree(force_sync=force_sync)   File "/media/zhou/LI/Android/JZO54L/.repo/repo/project.py", line 2486, in _InitWorkTree     raise GitError("cannot initialize work tree") error.GitError: cannot initialize work tree
그래서/external/srec에 문제가 생겼습니다.
해결:
보이는 파일에서 이 디렉터리'/external/srec'를 삭제합니다.
그리고 명령줄 아래에서 다음 두 디렉터리를 삭제합니다.
.repo/projects/external/srec.git
.repo/project-objects/platform/external/srec.git
$ cd .repo
$ cd projects
$ rm -rf external/srec.git
$ cd ..


$ cd project-objects
$ cd platform
$ rm -rf external/srec.git

마지막으로 Reposync로 동기화를 완성합니다.
 

참고


https://blog.csdn.net/ly890700/article/details/54848373

좋은 웹페이지 즐겨찾기