-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bootstrap.sh creates absolute symlinks not relative symlinks which break relocation of source tree #3174
Comments
I looked at making this change. It turns out that we allow VTTOP and VTROOT to be set independently: you can run dev.env with VTROOT already set. If so, the scripts will honor that value. Changing the script to use relative paths will break that flexibility. However, there is an easy workaround: you should be able to re-run bootstrap on the new tree, and it should fix up all links correctly. I'll wait for better ideas. If not, I'll close this. |
ok, well maybe if things aren't set then set relative vs absolute paths. If they are set then respect what's configured. My goal was to only make it link relatively if the other settings are not configured. If you're not convinced by this then I guess I now can recognise the issue. |
Setting the links conditionally may work. |
This is cleaned up a lot in #5527 I suggest that as an alternative fix, we change the bootstrap to be link-less. We can look at further cleanup after 5527 merges and the python tests are all converted to go. |
Closing this for now. Reopen if needed. |
bootstrap.sh pulls down some external code and does all the right things to prepare Vitess for building. However one thing it does which I think could be better is to make symlinks between some files and directories and these symlinks are absolute paths.
The problem with this is that if you ever relocate the $VTROOT path somewhere else all these symlinks will point into the ether and the code will stop working. I was bitten by this a few times and I guess others can too as usually it's fine to move a directory tree about but in the case of Vitess that may not be true.
A solution would be to replace the absolute links with relative symlinks.
This can be seen here:
So creating this issue so there's a reference to it.
The text was updated successfully, but these errors were encountered: