Errors with 'repo sync' relating to update_engine

1,420 views
Skip to first unread message

Richard Barnette

unread,
Oct 10, 2016, 11:35:33 AM10/10/16
to Chromium OS dev
This morning, I'm seeing the following error when I
run `repo sync`:

error: Cannot fetch aosp/platform/system/update_engine (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/aosp/system/update_engine` to proceed.)

Questions:
* Is this expected because of a known change?
* What changed to make this happen?
* Why was it necessary to make that change?
* Why was there no PSA to warn that this was going to
happen?

I assume that if I follow instructions regarding
`repo sync --force-sync`, the right thing will happen, but
I'd like to know more.

-- jrb

Simran Basi

unread,
Oct 10, 2016, 11:40:37 AM10/10/16
to Richard Barnette, Alex Deymo, Chromium OS dev
+Deymo


--
--
Chromium OS Developers mailing list: chromiu...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-os-dev?hl=en

---
You received this message because you are subscribed to the Google Groups "Chromium OS dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-os-dev+unsubscribe@chromium.org.


Richard Barnette

unread,
Oct 10, 2016, 11:44:06 AM10/10/16
to Simran Basi, Alex Deymo, Chromium OS dev

> On Oct 10, 2016, at 8:40 AM, Simran Basi <sb...@google.com> wrote:
>
> +Deymo
>
... Actually, this problem isn't specific to update_engine:
I'm getting the same error for src/aosp/system/connectivity/apmanager.
> To unsubscribe from this group and stop receiving emails from it, send an email to chromium-os-d...@chromium.org.
>
>

Richard Barnette

unread,
Oct 10, 2016, 11:51:50 AM10/10/16
to Richard Barnette, Simran Basi, Alex Deymo, Chromium OS dev

> On Oct 10, 2016, at 8:44 AM, Richard Barnette <jrbar...@chromium.org> wrote:
>
>>
>> On Oct 10, 2016, at 8:40 AM, Simran Basi <sb...@google.com> wrote:
>>
>> +Deymo
>>
> ... Actually, this problem isn't specific to update_engine:
> I'm getting the same error for src/aosp/system/connectivity/apmanager.
>
This is definitely something relating to AOSP:
* Forcing the update with --force-sync just for update_engine
fixes that repo, but then the problem moves to minijail.
* In a different source tree, the problem shows up first with
'apmanager'.

I imagine a blanket `--force-sync` will help, but honestly, I
don't know what that will do if I have local changes or branches
outside of AOSP.

Bill Richardson

unread,
Oct 10, 2016, 12:15:02 PM10/10/16
to Simran Basi, Richard Barnette, Alex Deymo, Chromium OS dev
And why do I see this?

... A new repo command ( 1.23) is available.
... You should upgrade soon:

    cp /home/wfrichar/work/fast/gerrit/.repo/repo/repo /home/wfrichar/work/fast/depot_tools/repo
 
Why am I told to copy a file from one git-managed repository into a *different* git-managed repository, instead of just running "git pull" or "repo sync".



Art for Art's Sake
Engineering for Money

Simran Basi

unread,
Oct 10, 2016, 12:25:58 PM10/10/16
to Bill Richardson, Richard Barnette, Alex Deymo, Chromium OS dev
I believe repo does a bootstrapping mechanism at runtime.

If you go into /home/wfrichar/work/fast/depot_tools/repo and do git pull does that update repo? Also I wouldn't be surprised if we need someone to update the depot_tools copy of repo for that to work as expected too.

Bill Richardson

unread,
Oct 10, 2016, 12:56:09 PM10/10/16
to Simran Basi, Richard Barnette, Alex Deymo, Chromium OS dev
I ran "git pull" in both .repo/repo and depot_tools/. The "repo" executable in .repo/repo was last touched in 2013. The one in depot_tools last month. I don't think copying the old one on top of the new one is the best plan.



Bill Richardson

unread,
Oct 10, 2016, 12:57:21 PM10/10/16
to Simran Basi, Richard Barnette, Alex Deymo, Chromium OS dev
And I'm also now seeing this in every repository when I run repo sync.

warn: <path>: Not replacing locally modified commit-msg hook


Mike Frysinger

unread,
Oct 10, 2016, 1:26:41 PM10/10/16
to Richard Barnette, Chromium OS dev
the repo guys made a backwards incompatible change and this is their solution.  follow the directions: use --force-sync if you don't care about the repo, or manually migrate the content first.
-mike

Mike Frysinger

unread,
Oct 10, 2016, 1:27:43 PM10/10/16
to Bill Richardson, Simran Basi, Richard Barnette, Alex Deymo, Chromium OS dev
because the depot_tools CL is waiting for a LGTM from an OWNER

the output from repo is geared towards people who maintain a copy of repo by hand rather than one checked into yet another git repo.
-mike

Sonny Rao

unread,
Oct 10, 2016, 2:13:21 PM10/10/16
to Mike Frysinger, Richard Barnette, Chromium OS dev
Can we get a PSA? Or is this thread it?
> ---
> You received this message because you are subscribed to the Google Groups
> "Chromium OS dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to chromium-os-d...@chromium.org.

Mike Frysinger

unread,
Oct 10, 2016, 2:15:21 PM10/10/16
to Sonny Rao, Richard Barnette, Chromium OS dev
at this point, this thread is it :)
-mike

Mike Frysinger

unread,
Oct 10, 2016, 5:35:49 PM10/10/16
to Chromium OS dev
for people not familiar with git, and want to preserve their local branches/content, my process for each individual project:
  • see if you have anything you care about stashed
    • `git stash list` -- if it's empty, you're done!
    • if there's stuff in there, you'll have to `git stash show -v stash@{N} > ~/some.patch` for each one and save it manually elsewhere
    • or use `git stash drop stash@{N}` to drop specific stashes you don't care about anymore
  • if all the patches are uploaded to gerrit already, just blow it away.  you can pull back down the branch from gerrit directly.
    • once you've blown away the checkout with `repo sync --force-sync`
    • run `repo start` like normal to recreate the branch
    • go into gerrit for the last CL in the series and find the Download->Cherry pick link
    • change the "cherry-pick" command to "merge"
    • or just run "cherry-pick" for each CL manually to recreate
  • if you haven't uploaded to gerrit and don't want to, you could save it in the sandbox namespace.
    • git push cros HEAD:refs/sandbox/$USER/foo  # save the current branch on the server
    • blow away the project with `repo sync --force-sync`
    • run `repo start` like normal
    • git merge cros refs/sandbox/$USER/foo
    • git push cros :refs/sandbox/$USER/foo  # delete the branch on the server
  • if you haven't uploaded to gerrit and don't want to, you could use format-patch & am to save locally.
    • make a dir outside of your repo checkout like ~/patches/foo/
    • run `git format-patch -12 -o ~/patches/foo` to save the last twelve patches
    • do force-sync+start to recreate the project+branch
    • run `git am ~/patches/foo/*` to re-apply the patches
  • if you're super paranoid about losing work, you can create a tarball of the git checkout
    • cd path/to/the/git/checkout/
    • tar -hzcf ~/checkout.tar.gz .
    • this will dereference all symlinks, so you don't have to worry about the repo weirdness in .git/ losing your stuff
    • now you have a ~/checkout.tar.gz of that one git repo you can take care of migrating later
i don't cover dirty git checkouts.  you can handle that ;).
-mike

On Mon, Oct 10, 2016 at 11:35 AM, Richard Barnette <jrbar...@chromium.org> wrote:

Richard Barnette

unread,
Oct 11, 2016, 12:47:08 PM10/11/16
to Mike Frysinger, Sonny Rao, Chromium OS dev

> On Oct 10, 2016, at 11:14 AM, Mike Frysinger <vap...@chromium.org> wrote:
>
> at this point, this thread is it :)
> -mike
>
By way of missing PSA, I find myself in need of more
information. Yesterday, I successfully sync'd one repo.
This morning, I went to sync in the same repo, and _new_
repositories made the same complaint.

How long should we expect this to go on? Is there a
command we can run right now to permanently fix this
problem so we never have to run `repo sync --force` again?
> > email to chromium-os-d...@chromium.org.
>

Richard Barnette

unread,
Oct 11, 2016, 12:52:44 PM10/11/16
to Richard Barnette, Mike Frysinger, Sonny Rao, Chromium OS dev

> On Oct 11, 2016, at 9:46 AM, Richard Barnette <jrbar...@chromium.org> wrote:
>
>>
>> On Oct 10, 2016, at 11:14 AM, Mike Frysinger <vap...@chromium.org> wrote:
>>
>> at this point, this thread is it :)
>> -mike
>>
> By way of missing PSA, I find myself in need of more
> information. Yesterday, I successfully sync'd one repo.
> This morning, I went to sync in the same repo, and _new_
> repositories made the same complaint.
>
> How long should we expect this to go on? Is there a
> command we can run right now to permanently fix this
> problem so we never have to run `repo sync --force` again?
>
Also, is there a list of repositories that we expect to see
affected? Is it just stuff under src/aosp?

Sonny Rao

unread,
Oct 11, 2016, 1:19:15 PM10/11/16
to Richard Barnette, Mike Frysinger, Chromium OS dev
On Tue, Oct 11, 2016 at 9:52 AM, Richard Barnette
<jrbar...@chromium.org> wrote:
>
>> On Oct 11, 2016, at 9:46 AM, Richard Barnette <jrbar...@chromium.org> wrote:
>>
>>>
>>> On Oct 10, 2016, at 11:14 AM, Mike Frysinger <vap...@chromium.org> wrote:
>>>
>>> at this point, this thread is it :)
>>> -mike
>>>
>> By way of missing PSA, I find myself in need of more
>> information. Yesterday, I successfully sync'd one repo.
>> This morning, I went to sync in the same repo, and _new_
>> repositories made the same complaint.
>>
>> How long should we expect this to go on? Is there a
>> command we can run right now to permanently fix this
>> problem so we never have to run `repo sync --force` again?
>>
> Also, is there a list of repositories that we expect to see
> affected? Is it just stuff under src/aosp?
>

I was seeing it across the board, not just src/aosp -- I still haven't
finished doing the --force-sync because I need to manuall go through
each repository and figure out if I want to save my old local branches
or not, so it's been a very slow process

Mike Frysinger

unread,
Oct 11, 2016, 1:35:47 PM10/11/16
to Richard Barnette, Sonny Rao, Chromium OS dev
On Tue, Oct 11, 2016 at 12:52 PM, Richard Barnette
<jrbar...@chromium.org> wrote:
> > On Oct 11, 2016, at 9:46 AM, Richard Barnette <jrbar...@chromium.org> wrote:
> > By way of missing PSA, I find myself in need of more
> > information. Yesterday, I successfully sync'd one repo.
> > This morning, I went to sync in the same repo, and _new_
> > repositories made the same complaint.
> >
> > How long should we expect this to go on? Is there a
> > command we can run right now to permanently fix this
> > problem so we never have to run `repo sync --force` again?
>
> Also, is there a list of repositories that we expect to see
> affected? Is it just stuff under src/aosp?

it is not specific to src/aosp at all. all new checkouts pulled down
by the new repo shouldn't hit the problem. it should only hit
checkouts made with older versions of repo.
-mike

Richard Barnette

unread,
Oct 11, 2016, 1:38:57 PM10/11/16
to Mike Frysinger, Sonny Rao, Chromium OS dev
OK. Why is the impact so piecemeal? If you run
`repo sync --force-sync` right now over an entire repo,
will that prevent the problem from showing up in bits
and drabs over the course of days? Or is the only way
to avoid it "re-create your repo from scratch"? Or must
we just always say `--force-sync`, and make sure we've
saved work beforehand?


> -mike

Mike Frysinger

unread,
Oct 11, 2016, 1:41:26 PM10/11/16
to Richard Barnette, Sonny Rao, Chromium OS dev
On Tue, Oct 11, 2016 at 1:38 PM, Richard Barnette wrote:
>> On Oct 11, 2016, at 10:34 AM, Mike Frysinger wrote:
>> On Tue, Oct 11, 2016 at 12:52 PM, Richard Barnette wrote:
>>>> On Oct 11, 2016, at 9:46 AM, Richard Barnette wrote:
>>>> By way of missing PSA, I find myself in need of more
>>>> information. Yesterday, I successfully sync'd one repo.
>>>> This morning, I went to sync in the same repo, and _new_
>>>> repositories made the same complaint.
>>>>
>>>> How long should we expect this to go on? Is there a
>>>> command we can run right now to permanently fix this
>>>> problem so we never have to run `repo sync --force` again?
>>>
>>> Also, is there a list of repositories that we expect to see
>>> affected? Is it just stuff under src/aosp?
>>
>> it is not specific to src/aosp at all. all new checkouts pulled down
>> by the new repo shouldn't hit the problem. it should only hit
>> checkouts made with older versions of repo.
>
> OK. Why is the impact so piecemeal? If you run
> `repo sync --force-sync` right now over an entire repo,
> will that prevent the problem from showing up in bits
> and drabs over the course of days? Or is the only way
> to avoid it "re-create your repo from scratch"? Or must
> we just always say `--force-sync`, and make sure we've
> saved work beforehand?

i haven't seen the behavior you've seen. when i ran `repo sync`, it
complained about a number of repos, and once i fixed them all, i
haven't seen the errors since.
-mike

Haixia Shi

unread,
Oct 11, 2016, 3:09:31 PM10/11/16
to Chromium OS dev, jrbar...@chromium.org, sonn...@chromium.org
I just did "repo sync --force-sync" this morning, but it didn't help. Instead of clearing up the errors, I lost my entire overlays/ directory and chromite/ directory.

In the end I just did an "rm -rf" of my entire chromeos checkout and started from scratch.

Ilja Friedel

unread,
Oct 11, 2016, 3:12:41 PM10/11/16
to Mike Frysinger, Richard Barnette, Sonny Rao, Chromium OS dev
Even with force sync I get problems with overlay-caroline-private (the bold lines are spew I added). That directory remains empty.

repo sync --force-sync
Shared project chromiumos/third_party/mesa found, disabling pruning.
Syncing work tree:  40% (166/414) 
['read-tree', '--reset', '-u', '-v', 'HEAD']
/usr/local_4TB/cros_tot/src/private-overlays/overlay-caroline-private/.git
fatal: This operation must be run in a work tree
Traceback (most recent call last):
  File "/usr/local_4TB/cros_tot/.repo/repo/main.py", line 531, in <module>
    _Main(sys.argv[1:])
  File "/usr/local_4TB/cros_tot/.repo/repo/main.py", line 507, in _Main
    result = repo._Run(argv) or 0
  File "/usr/local_4TB/cros_tot/.repo/repo/main.py", line 180, in _Run
    result = cmd.Execute(copts, cargs)
  File "/usr/local_4TB/cros_tot/.repo/repo/subcmds/sync.py", line 804, in Execute
    project.Sync_LocalHalf(syncbuf, force_sync=opt.force_sync)
  File "/usr/local_4TB/cros_tot/.repo/repo/project.py", line 1404, in Sync_LocalHalf
    self._InitWorkTree(force_sync=force_sync)
  File "/usr/local_4TB/cros_tot/.repo/repo/project.py", line 2563, in _InitWorkTree
    raise GitError("cannot initialize work tree")
error.GitError: cannot initialize work tree


-mike

--
--
Chromium OS Developers mailing list: chromiu...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-os-dev?hl=en

---
You received this message because you are subscribed to the Google Groups "Chromium OS dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-os-dev+unsubscribe@chromium.org.


Mike Frysinger

unread,
Oct 11, 2016, 3:24:22 PM10/11/16
to Haixia Shi, Chromium OS dev, Richard Barnette, Sonny Rao
what do you mean by "lost" ?  you mean any changes/branches you had in there are gone now ?  or that the checkouts no longer exist ?

for the former, that's to be expected as the error message (and this thread) covered.

for the latter, that's most likely a bug in repo.  while messing around with things locally, i found it was possible to wedge `repo sync` in a way it couldn't automatically recover.  if you don't care, then simply blowing everything away would be the easiest to recover.
-mike

--

Mike Frysinger

unread,
Oct 11, 2016, 3:25:14 PM10/11/16
to Ilja Friedel, Richard Barnette, Sonny Rao, Chromium OS dev
try:
rm -rf src/private-overlays/overlay-caroline-private
find .repo/ -name 'overlay-caroline-private*' -exec rm -rf {} +
repo sync chromeos/overlays/overlay-caroline-private
-mike

Haixia Shi

unread,
Oct 11, 2016, 3:51:48 PM10/11/16
to Mike Frysinger, Chromium OS dev, Richard Barnette, Sonny Rao
I meant the checkouts no longer exist.

In any case, I've already blown away my old checkout, so it's moot now.

Ilja Friedel

unread,
Oct 11, 2016, 9:33:49 PM10/11/16
to Mike Frysinger, Richard Barnette, Sonny Rao, Chromium OS dev
Didn't see your response for some reason. I ended up copying the missing caroline dir from a working checkout. If it makes problems again I will blow it away as suggested.

Ben

unread,
Oct 11, 2016, 10:16:51 PM10/11/16
to Chromium OS dev, vap...@chromium.org, jrbar...@chromium.org, sonn...@chromium.org
I just hit a similar issue, though it's an empty shill repo instead of overlay-caroline-private. Mike's method worked. Thanks!

benzh@benzh:/c$ repo sync --force-sync
...
Shared project chromiumos/third_party/mesa found, disabling pruning.
fatal: This operation must be run in a work tree
Traceback (most recent call last):
  File "/c/.repo/repo/main.py", line 531, in <module>
    _Main(sys.argv[1:])
  File "/c/.repo/repo/main.py", line 507, in _Main
    result = repo._Run(argv) or 0
  File "/c/.repo/repo/main.py", line 180, in _Run
    result = cmd.Execute(copts, cargs)
  File "/c/.repo/repo/subcmds/sync.py", line 804, in Execute
    project.Sync_LocalHalf(syncbuf, force_sync=opt.force_sync)
  File "/c/.repo/repo/project.py", line 1404, in Sync_LocalHalf
    self._InitWorkTree(force_sync=force_sync)
  File "/c/.repo/repo/project.py", line 2561, in _InitWorkTree
    raise GitError("cannot initialize work tree. benzh: cmd={0}, dotgit={1}".format(cmd, dotgit))
error.GitError: cannot initialize work tree. benzh: cmd=['read-tree', '--reset', '-u', '-v', 'HEAD'], dotgit=/c/src/aosp/system/connectivity/shill/.git
benzh@benzh:/c$ ls -la /c/src/aosp/system/connectivity/shill
total 8
drwxr-xr-x 2 benzh eng 4096 Oct 11 19:01 .
drwxr-xr-x 4 benzh eng 4096 Oct 11 18:59 ..
benzh@benzh:/c$

benzh@benzh:/c$ rm -rf src/aosp/system/connectivity/shill
benzh@benzh:/c$ find .repo -name 'shill*' -exec rm -rf {} +
benzh@benzh:/c$ repo sync aosp/platform/system/connectivity/shill
Fetching project aosp/platform/system/connectivity/shill
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100     1  100     1    0     0      1      0  0:00:01 --:--:--  0:00:01     1
100 11.5M  100 11.5M    0     0  9637k      0  0:00:01  0:00:01 --:--:-- 43.7M
Receiving objects: 100% (27016/27016), 11.59 MiB | 0 bytes/s, done.
Resolving deltas: 100% (22605/22605), done.
From /c/.repo/projects/src/aosp/system/connectivity/shill.git/clone.bundle
 * [new branch]      upstream   -> cros/upstream
...
remote: Finding sources: 100% (3/3)           
remote: Total 3 (delta 1), reused 3 (delta 1)        
   6414fab..acd688c  master     -> cros/master
Fetching projects: 100% (1/1), done.  

Your sources have been sync'd successfully.
benzh@benzh:/c$ 

Puneet Kumar

unread,
Oct 12, 2016, 11:38:16 AM10/12/16
to Ben, Chromium OS dev, vap...@chromium.org, jrbar...@chromium.org, sonn...@chromium.org
Mike,
Do we know the offending changes in repo that is causing all these problems?  Can we unroll the repo changes and get back to sanity, or get a fix in place so more people don't hit these issues?   Its important to get out a PSA so more people don't end up in this soup.  I'd like to ensure that the fix is being given a very high priority given the productivity hit to the entire group.  Who do I need to work with?

Puneet

-mike

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-os-d...@chromium.org.




--
--
Chromium OS Developers mailing list: chromiu...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-os-dev?hl=en

---
You received this message because you are subscribed to the Google Groups "Chromium OS dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-os-d...@chromium.org.

Achuith Bhandarkar

unread,
Oct 12, 2016, 2:15:51 PM10/12/16
to Puneet Kumar, Ben, Chromium OS dev, Mike Frysinger, Richard Barnette, Sonny Rao
I needed to force sync just these repos:

src/aosp/system/connectivity/shill
src/aosp/external/minijail 
src/aosp/system/firewalld
src/aosp/system/tpm
src/aosp/system/webservd
src/third_party/modp_b64
src/aosp/system/connectivity/apmanager 
src/aosp/external/libbrillo
src/platform/bmpblk
src/aosp/system/update_engine
src/aosp/external/dbus-binding-generator
src/aosp/external/libchrome


-mike

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-os-dev+unsubscribe@chromium.org.




--
--
Chromium OS Developers mailing list: chromiu...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-os-dev?hl=en

---
You received this message because you are subscribed to the Google Groups "Chromium OS dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-os-dev+unsubscribe@chromium.org.

Mike Frysinger

unread,
Oct 12, 2016, 3:11:04 PM10/12/16
to Puneet Kumar, Ben, Chromium OS dev, Richard Barnette, Sonny Rao
i don't think it's something we can walk back.  iiuc, repo made some backwards incompatible changes to the filesystem layout under .repo/.

imo, the tool should have detected & migrated automatically.  i'm not sure why they opted to just fail ... maybe they went the route of "let's see if anyone complains" before spending time on trying to automate.  the bug i opened on the topic upstream:

i don't think the repo project has a mailing list or contact group.  there's a loose collection of devs spread across Gerrit/Android (and to a lesser degree, Chrome).  i usually just find a victim by looking at the logs:

-mike

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-os-dev+unsubscribe@chromium.org.




--
--
Chromium OS Developers mailing list: chromiu...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-os-dev?hl=en

---
You received this message because you are subscribed to the Google Groups "Chromium OS dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-os-dev+unsubscribe@chromium.org.

Zhihong Yu

unread,
Oct 14, 2016, 6:23:15 PM10/14/16
to Mike Frysinger, Puneet Kumar, Ben, Chromium OS dev, Richard Barnette, Sonny Rao
Just did  a repo sync, and fell into the same scenario. Overwrote repo as directed but --force-sync didn't help.


(cr) ((01f8f4e...)) zhihongyu@zyu0 ~/trunk/src/scripts $ repo sync
Fetching project chromiumos/third_party/dpkt
Fetching project aosp/platform/system/connectivity/shill
Fetching project chromiumos/platform/ec
Fetching project chromiumos/platform/mtplot
Fetching project chromiumos/platform/battery_updater
Fetching project chromiumos/third_party/hostap
Fetching project chromeos/overlays/overlay-quawks-private
Fetching project chromeos/third_party/nvidia-atf
error: Cannot fetch aosp/platform/system/connectivity/shill (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/aosp/system/connectivity/shill` to proceed.)
Fetching project chromiumos/platform/vpd
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/lib64/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/mnt/host/source/.repo/repo/subcmds/sync.py", line 276, in _FetchProjectList
    success = self._FetchHelper(opt, project, *args, **kwargs)
  File "/mnt/host/source/.repo/repo/subcmds/sync.py", line 321, in _FetchHelper
    cache_dir=opt.cache_dir)
  File "/mnt/host/source/.repo/repo/project.py", line 1291, in Sync_NetworkHalf
    self._InitGitDir(force_sync=force_sync)
  File "/mnt/host/source/.repo/repo/project.py", line 2343, 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/aosp/system/connectivity/shill` to proceed.

Fetching projects:   1% (5/415)  
error: Exited sync due to fetch errors

(cr) ((01f8f4e...)) zhihongyu@zyu0 ~/trunk/src/scripts $ repo sync --force-sync src/aosp/system/connectivity/shill
error: project src/aosp/system/connectivity/shill not found

*** And seems lost all local banches

(cr) ((01f8f4e...)) zhihongyu@zyu0 ~/trunk/src/scripts $ repo branches
error: in `branches`: [Errno 2] No such file or directory: u'/mnt/host/source/src/platform/arc-camera/.git/HEAD'
error: manifest missing or unreadable -- please run init

Any rescue suggestion is greatly appreciated.

Thanks,
Zhihong

Zhihong Yu

unread,
Oct 14, 2016, 6:35:40 PM10/14/16
to Mike Frysinger, Puneet Kumar, Ben, Chromium OS dev, Richard Barnette, Sonny Rao
Read through this thread and try different approaches and my chroot is in use again.
Summarized below.

> repo sync
fail, this time it even comes up another project required to force-sync: src/aosp/system/werservd

> repo sync --force-sync src/aosp/system/connectivity/shill
fail, project not found

> repo_sync --force-sync
without adding any project name, this command can run to complete

Thanks,
Zhihong

Zhihong Yu

unread,
Oct 14, 2016, 7:17:13 PM10/14/16
to Ben Zhang, Mike Frysinger, Puneet Kumar, Chromium OS dev, Richard Barnette, Sonny Rao
Ben you are right. I was running under ~/trunk/src/scripts. so using per project --force-sync should work too.

Tahnks,
Zhihong

On Fri, Oct 14, 2016 at 3:55 PM, Ben Zhang <be...@google.com> wrote:
(cr) ((01f8f4e...)) zhihongyu@zyu0 ~/trunk/src/scripts $ repo sync --force-sync src/aosp/system/connectivity/shill
I think the project path argument to "repo sync" is relative to the current directory. Maybe run it under ~/trunk/.
The shill project is probably already synced (with local branches wiped) since "repo sync --force-sync" succeeded.

Not sure about the arc-camera issue though.

Andrew de los Reyes

unread,
Oct 17, 2016, 3:36:15 PM10/17/16
to Zhihong Yu, Ben Zhang, Mike Frysinger, Puneet Kumar, Chromium OS dev, Richard Barnette, Sonny Rao
Guess i'm a bit late to this thread, but my solution was:

for p in `repo list | cut -d : -f 1` ; do repo sync --force-sync $p ; done

-mike

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-os-d...@chromium.org.




--
--
Chromium OS Developers mailing list: chromiu...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-os-dev?hl=en

---
You received this message because you are subscribed to the Google Groups "Chromium OS dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-os-d...@chromium.org.

--
--
Chromium OS Developers mailing list: chromiu...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-os-dev?hl=en

---
You received this message because you are subscribed to the Google Groups "Chromium OS dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-os-d...@chromium.org.



Marc

unread,
Oct 27, 2016, 4:04:21 PM10/27/16
to Chromium OS dev
On Monday, October 10, 2016 at 8:35:33 AM UTC-7, Richard Barnette wrote:
This morning, I'm seeing the following error when I
run `repo sync`:

error: Cannot fetch aosp/platform/system/update_engine (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/aosp/system/update_engine` to proceed.)



I just submitted this one-line _error(...) addition in repo/project.py: https://gerrit-review.googlesource.com/#/c/90130/
_CheckDirReference: log actual error before suggesting --force-sync


Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages