-
Notifications
You must be signed in to change notification settings - Fork 279
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
catkin_make and friends fail to correctly resolve paths when invoked inside symlinked folders #638
Comments
Thank you for filling the ticket. The problem is that Python is not aware that it is invoked in
it outputs If you do know a way how Python can get the required information please share it and I will be happy to resolve the the described bug in the |
As I have said before, I had already solved this in #603 using
https://github.com/tkruse/catkin/commit/de98d064b32eea82b023a2056f25dba4a70edb3a In catkin/python/catkin/workspace.py def get_cwd_rel_path(rel_or_abspath):
'''returns the path if absolute, cwd if None, else cwd joined with the given relative path'''
if rel_or_abspath and os.path.isabs(rel_or_abspath):
return rel_or_abspath
# Many, but not all shells, support this var that contains the path preserving symbolic link structures
pwdpath = os.getenv('PWD')
if pwdpath is None:
# this function normalizes the path, does not follow symbolic links
pwdpath = os.getcwd()
if rel_or_abspath is not None:
pwdpath = os.path.join(pwdpath, rel_or_abspath)
return pwdpath This then has to be invoked in the repsective places in catkin_make and catkin_make_isolated, as I had done in my pull request, until you kept on dismissing my PR due to this catkin bug. |
Since you removed the code from your pull request at some time that information was not publically available anymore. With that snippet I was able to create a pull request which should address this bug. Please try #639 and verify that it works for you, too. |
To reproduce
Result:
The specified source space "/src" does not exist
Should be:
Building in basefolder/hydro-ws
The issue was originally discovered by @dirk-thomas in #603 and used as a reason to reject new features. Not sure why it was not ticketed and/or fixed since then, maybe keeping this bug can help reject more undesired pull requests in the future.
A function used to fix the buggy behavior was also originally given in PR #603, and would be merged in catkin by now if the maintainers had cared.
The text was updated successfully, but these errors were encountered: