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
fix another FreeBSD $HOME symlink issue #1973
Conversation
# This is needed on FreeBSD, and maybe other systems which symlink /home to | ||
# /usr/home, but retain the $HOME variable as pointing to /home | ||
if os.path.realpath(HOME) != HOME: | ||
HOME = os.path.realpath(HOME) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it simpler just to do HOME = os.path.realpath(HOME)
unconditionally? If it wouldn't trigger this if
, then doing it unconditionally would make no difference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use existing utils.path.get_home_dir, where you fixed this the first time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thomas Kluyver, on 2012-06-16 05:32, wrote:
Isn't it simpler just to do
HOME = os.path.realpath(HOME)
unconditionally? If it wouldn't trigger thisif
, then doing
it unconditionally would make no difference.
good point, just applied this change
Min RK, on 2012-06-16 21:23, wrote:
Why not use existing utils.path.get_home_dir, where you fixed
this the first time?
That function ends up returning a directory under windows, where
I guess $HOME isn't typically defined. It looks like in this
code, windows ends up getting a nonsensical HOME so that no
directory ends up getting replaced with ~.
Does that seem reasonable enough?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, makes sense. It seems like this can go in, then.
Test results for commit d39ba53 merged into master
Not available for testing: python2.6 |
Test results for commit d39ba53 merged into master
Not available for testing: python2.6 |
The failure the first time was a sporadic failure, not related to this. Merging now. I think I see that failure once each time I turn my computer on. I must get round to debugging it. |
fix another FreeBSD $HOME symlink issue
fix another FreeBSD $HOME symlink issue
without these changes, I get this error in
IPython.core
on FreeBSD 9.0I've verified that this change does not break any tests under Ubuntu when HOME happens to be symlinked.
I don't know how this will affect windows