New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 685766 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 684907
Owner:
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

bootstrap.py has trouble moving between branches

Project Member Reported by dgarr...@chromium.org, Jan 26 2017

Issue description

When bootstrap.py tries to move from a newer to an older branch, it can fail with sync errors:

When running this test:

BOOTSTRAP="${SANDBOX_DIR}/chromite/scripts/bootstrap --debug --buildbot --notests --buildroot ~/sand/buildroot"

${BOOTSTRAP} mario-incremental &&
  ${BOOTSTRAP} -b release-R57-9202.B mario-incremental &&
  ${BOOTSTRAP} -b release-R35-5712.B mario-incremental


It fails on the R35 checkout with:

error: Cannot fetch chromeos/toolchain-utils (GitError: --force-sync not enabled; cannot overwrite a local work tree. If you're comfortable with the possibility of losing the work tree's git metadata, use `repo sync --force-sync src/third_party/toolchain-utils` to proceed.)
Exception in thread Thread-100:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/local/google/home/dgarrett/sand/buildroot/.repo/repo/subcmds/sync.py", line 276, in _FetchProjectList
    success = self._FetchHelper(opt, project, *args, **kwargs)
  File "/usr/local/google/home/dgarrett/sand/buildroot/.repo/repo/subcmds/sync.py", line 321, in _FetchHelper
    cache_dir=opt.cache_dir)
  File "/usr/local/google/home/dgarrett/sand/buildroot/.repo/repo/project.py", line 1293, in Sync_NetworkHalf
    self._InitGitDir(force_sync=force_sync)
  File "/usr/local/google/home/dgarrett/sand/buildroot/.repo/repo/project.py", line 2346, in _InitGitDir
    raise e
GitError: --force-sync not enabled; cannot overwrite a local work tree. If you're comfortable with the possibility of losing the work tree's git metadata, use `repo sync --force-sync src/third_party/toolchain-utils` to proceed.


 
This is not unexpected, and it caused by mixing newer versions of repo with older versions of cbuildbot.

The solution may be to wipe the checkout before building any more older than the current stable branch. Since all such builds are rare (and usually single boards one-offs for firmware or factory), this is a reasonable solution.

After we move the chromeos checkout into bootstrap.py, the wipe would no longer be required.
Mergedinto: 684907
Status: Duplicate (was: Untriaged)

Sign in to add a comment