-
Notifications
You must be signed in to change notification settings - Fork 3k
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 for 3141: symlink in consolescript path #3142
Conversation
This fixes issue 3141, where a uninstall error occurs when upgrading/uninstalling and the path to the console script contains symlinks. As the path is in installed-files.txt as well and these paths are joined to the real path coming from .egg_info, the uninstall will try to remove the console script using two different paths and fail on the second (non-real) path.
Since we dont want to break it for #2552, I think a middle-ground solution could be:
|
cc @qwcode since you reviewed and merged #2552 |
I think I'd rather have this fix: https://github.com/qwcode/pip/commit/e2450f0e99d8d94e72ea746f34f0cf1e5c51b7dd this places the fix closer to the cause of all this (right below it), so I think it's clearer. also, the point is not to resolve the console scripts I think, but to detect when the set already contains a resolved version of them. I think my comment in the diff is accurate enough on how this happens, but I'd like to make it clearer tomorrow and add a test, and then I could post a PR. |
@qwcode Read and approved :) |
@qwcode I tested your fix ( https://github.com/qwcode/pip/commit/e2450f0e99d8d94e72ea746f34f0cf1e5c51b7dd ) locally here and it solves the issue I am having as well. |
@AvdN yea, I'll be putting in a PR. hopefully today. if/when it's merged, I'd go around and cleanup other issues and PRs |
btw, my PR will be different than what I posted above, since after adding tests, I realized it was flawed, but I'll explain more when I post |
closing in lieu of #3154 |
This fixes issue #3141, where a uninstall error occurs
when upgrading/uninstalling and the path to the console
script contains symlinks. As the path is in installed-files.txt
as well and these paths are joined to the real path coming
from .egg_info, the uninstall will try to remove the
console script using two different paths and fail on the second
(non-real) path.