-
Notifications
You must be signed in to change notification settings - Fork 948
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
Warn (error?) about symlinks outside of package #4147
Comments
Probably checking always all the files to see if they belong to the package is costly. We could provide a tool maybe? how the files were packaged? by conan or by an external install? I don't know if the conan copy could check links pointing out of the package. |
IIRC the FileCopier class already clears the broken symlinks but I am not sure if it takes the outside symlinks into account |
Maybe this can be a |
Did a small test and the FileCopier is copying the symlink correctly but it does not take into account that the "outside links" have to be copied too:
However, I think this is the right behavior as we don't know if the user is doing this on purpose or not (for example in the case of a conanfile used to mimic a System package). The most we could do is provide a tool for this, bu I think the user should be responsible for taking care of the symlinks on what they is trying to achieve |
That's the reason I was suggesting a hook. Maybe we can provide an implementation that warns about links outside a package (traverse the packaged directory checking for links outside it), the user can activate/deactivate it, or even modify it to raise an error instead of a warning. |
Agree. I have opened an issue in the hooks repo conan-io/hooks#14 I think it is enough to close this one |
Originally posted by @michiel-dewilde in #4051 (comment)
The text was updated successfully, but these errors were encountered: