Fresh "gclient sync" in infra_internal repo failing. |
|||
Issue description
Fresh "gclient sync" in infra_internal repo failing.
~/chrome_infra$ gclient sync
Syncing projects: 100% (49/49), done.
________ running '/usr/local/google/home/akeshet/venv/bin/python -u ./infra/bootstrap/remove_orphaned_pycs.py infra_internal' in '/usr/local/google/home/akeshet/chrome_infra'
________ running '/usr/local/google/home/akeshet/venv/bin/python -u ./infra_internal/bootstrap/bootstrap_internal.py infra_internal/ENV' in '/usr/local/google/home/akeshet/chrome_infra'
ERROR:__main__:Already activated environment!
Traceback (most recent call last):
File "./infra_internal/bootstrap/bootstrap_internal.py", line 83, in <module>
sys.exit(main(sys.argv[1:]))
File "./infra_internal/bootstrap/bootstrap_internal.py", line 79, in main
return finish_internal_bootstrap(env_path)
File "./infra_internal/bootstrap/bootstrap_internal.py", line 53, in finish_internal_bootstrap
os.symlink(source, target)
OSError: [Errno 2] No such file or directory
Error: Command '/usr/local/google/home/akeshet/venv/bin/python -u ./infra_internal/bootstrap/bootstrap_internal.py infra_internal/ENV' returned non-zero exit status 1 in /usr/local/google/home/akeshet/chrome_infra
,
May 3 2017
It looks to me like you're running the sync from within a VirtualEnv, which is explicitly disallowed by the script for some reason. I think this is the cause; easy solution would be to not run sync from a Venv. Harder might be to figure out why it cares and mitigate it.
,
May 3 2017
Ah indeed, and now I remember that I was bit by this before. Can the logging here be made more obvious, if this script is going to bother to care so much about already being in a virtualenv?
,
May 3 2017
Well, it does say, "ERROR:__main__:Already activated environment!"
,
May 4 2017
Yeah, but that's pretty vague, obscured by a stackstrace, and accompanied by misleading text "No such file or directory" Is it that unusual for developers to have their bash shell inside of their own python virtualenv? Several people on my team do this. Seems like tools shouldn't assume otherwise.
,
May 4 2017
No idea what's usual. I didn't write the bootstrap, nor did I impose this restriction, so I'm not sure what the motivation or circumstances around it are. Personally this has annoyed me more than once, but I just deactivate. Agreed that it would be nice if it weren't a problem at all. +iannucci@, who I believe wrote that. Can we remove this check, or step out of a VirtualEnv instead? It does kind of suck...
,
Oct 19
|
|||
►
Sign in to add a comment |
|||
Comment 1 by mmoss@chromium.org
, May 3 2017