WSL: Failed to retrieve the master AOSP source code

# ~/repo init -u https://android.googlesource.com/platform/manifest
# ~/repo sync
...
Fetching projects: 100% (512/512), done.
Syncing work tree:  59% (303/512)  error: unable to create file tests/P_str_escape/str\\escape.rs (No such file or directory)
Traceback (most recent call last):
  File "/root/android/.repo/repo/main.py", line 531, in <module>
    _Main(sys.argv[1:])
  File "/root/android/.repo/repo/main.py", line 507, in _Main
    result = repo._Run(argv) or 0
  File "/root/android/.repo/repo/main.py", line 180, in _Run
    result = cmd.Execute(copts, cargs)
  File "/root/android/.repo/repo/subcmds/sync.py", line 769, in Execute
    project.Sync_LocalHalf(syncbuf, force_sync=opt.force_sync)
  File "/root/android/.repo/repo/project.py", line 1247, in Sync_LocalHalf
    self._InitWorkTree(force_sync=force_sync)
  File "/root/android/.repo/repo/project.py", line 2393, in _InitWorkTree
    raise GitError("cannot initialize work tree")
error.GitError: cannot initialize work tree
root@localhost:~/android#

About this issue

  • Original URL
  • State: closed
  • Created 11 years ago
  • Comments: 15 (3 by maintainers)

Most upvoted comments

Fix https://github.com/NyaSik/FixDownloadAnrdoid

I do not know if the tambourine and the sacrifice of the goat helped the neighbor. Or this fix.

1239

@skyhover Did you tested it? I did not work for me. But this worked:

rm -rf frameworks/compile/slang/ mkdir /home/<user>/slang_helper sudo ln -s /home/<user>/slang_helper frameworks/compile/slang

@callingmedic911 It’s looks like a limitation of DrvFs (/mnt/* folders). Try in a VolFs folder like /home/user and you should have better luck. More info here: https://blogs.msdn.microsoft.com/wsl/2016/06/15/wsl-file-system-support/

A workaround: create the file “tests/P_str_escape/str/escape.rs” manually (with empty content). Can run “repo --trace sync” to find where to create the file; it’s likely in the “frameworks/compile/slang” folder.

I tried this locally and I was able to initialize and sync the repro without errors. I suspect that the root cause of this issue was the same as #313.

Now to try to compile android from my shiny new Android repo 😃