-
Notifications
You must be signed in to change notification settings - Fork 113
Also try to remove broken symlinks during uninstall #929
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
Conversation
|
If a user install a bunch of packages from an environment, and then removes the environment without uninstalling the packages this can create problems when trying to install again later on. The uninstall process now also removes all broken symlinks... |
Licini
left a comment
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.
Looks good!
|
the following will now also happen during the install procedure:
|
|
not sure if this is what we mean to happen though. |
src/compas_rhino/install.py
Outdated
| exit_code = 0 | ||
|
|
||
| for name in os.listdir(scripts_path): | ||
| if name.startswith('compas') and not name.endswith('.py'): |
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.
Would it make sense for this to also include all installable_rhino_packages? In the case that packages is provided by the user, then something like roslibpy (which is a default installable package for compas_fab) would be missed by this check and also would not be added to packages by _filter_installable_packages to be removed and added again.
CHANGELOG.md
Outdated
| ### Changed | ||
|
|
||
| * Changed `compas_rhino.uninstall` to also remove broken symlinks if no specific packages are provided for installation. | ||
| * Changed `compas_rhino.install` to also remove broken symlinks if no specific packages are provided for installation. |
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.
It looks like broken symlinks are removed whether or not packages are specified on install.
src/compas_rhino/uninstall.py
Outdated
| if not packages: | ||
| packages = [] | ||
| for name in os.listdir(scripts_path): | ||
| if name.startswith('compas') and not name.endswith('.py'): |
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.
again, roslibpy or other default compas-installed packages?
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.
is this also the case here?
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.
yes, i think so.
CHANGELOG.md
Outdated
|
|
||
| ### Changed | ||
|
|
||
| * Changed `compas_rhino.uninstall` to also remove broken symlinks if no specific packages are provided for installation. |
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.
'for un-installation'?
| # add the packages that can't be imported from the current env to the list of symlinks to uninstall | ||
| # and remove the package name from the list of installable packages | ||
| # make a copy of the list to avoid problems with removing items | ||
| # note: perhaps this should already happen in the filter function... |
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.
This makes sense to me.
What type of change is this?
Checklist
Put an
xin the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.CHANGELOG.mdfile in theUnreleasedsection under the most fitting heading (e.g.Added,Changed,Removed).invoke test).invoke lint).compas.datastructures.Mesh.