0

I'm trying to use repo to download the Android source as per Google's instructions. I've downloaded and initialized the Repo client and am now trying to update the working tree. After running repo sync --force-broken, all projects appear to be fetched correctly as console output reads Fetching projects: 100% (733/733), done. However, immediately after printing, that messsage, Repo appears to fail to sync the work tree, showing the following error:

Syncing work tree:   0% (2/733) (NOTE: newline inserted here for readability)
error: unable to create file pathtools/testdata/escapes/*: Invalid argument
fatal: cannot create directory at 'pathtools/testdata/escapes/**': Invalid argument
Traceback (most recent call last):
  File "D:\2019 Work\androidsrc\.repo\repo/main.py", line 547, in <module>
    _Main(sys.argv[1:])
  File "D:\2019 Work\androidsrc\.repo\repo/main.py", line 522, in _Main
    result = repo._Run(argv) or 0
  File "D:\2019 Work\androidsrc\.repo\repo/main.py", line 184, in _Run
    result = cmd.Execute(copts, cargs)
  File "D:\2019 Work\androidsrc\.repo\repo\subcmds\sync.py", line 855, in Execute
    project.Sync_LocalHalf(syncbuf, force_sync=opt.force_sync)
  File "D:\2019 Work\androidsrc\.repo\repo\project.py", line 1380, in Sync_LocalHalf
    self._InitWorkTree(force_sync=force_sync, submodules=submodules)
  File "D:\2019 Work\androidsrc\.repo\repo\project.py", line 2594, in _InitWorkTree
    raise GitError("cannot initialize work tree for " + self.name)
error.GitError: cannot initialize work tree for platform/build/blueprint

repo --version yields:

repo version v1.13.3
       (from https://gerrit.googlesource.com/git-repo)
repo launcher version 1.25
       (from C:\Program Files\Git\usr\bin\repo)
git version 2.22.0.windows.1
Python 2.7.16 (v2.7.16:413a49145e, Mar  4 2019, 01:37:19) [MSC v.1500 64 bit (AMD64)]
10
  • any solutions did you got? Commented Aug 29, 2019 at 5:31
  • @RahulBaradia Still nothing, sorry. :/
    – Eric Reed
    Commented Aug 30, 2019 at 13:42
  • any luck ??, did you get any workaround?
    – Venky
    Commented Sep 14, 2019 at 11:23
  • @Venky Nope, nothing, same issue.
    – Eric Reed
    Commented Sep 15, 2019 at 23:09
  • @HewwoCraziness are you doing this on WSL or on a Linux Distro?
    – Venky
    Commented Sep 16, 2019 at 9:56

1 Answer 1

0

cd into < build-root > (i.e. dir where bionic/, development/, device/, et.c are located) and try:

repo sync --force-sync build/blueprint

If facing same issues in multiple directories, try:

for subprj in $(repo status | grep ^project | cut -d ' ' -f2); 
do 
    repo sync --force-sync $subprj; 
done

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .