If linking fails, we unlink, but… #14370

Closed
mxcl opened this Issue Aug 22, 2012 · 3 comments

3 participants

@mxcl
Homebrew member

We shouldn't unlink, we should just delete any symlinks created during this link step. Rationale: linking often fails due to conflicts with another formula's symlinks. Unlinking deletes the conflicting file. Eg:

  • foo provides bin/a
  • bar also provides bin/a

Linking bar when foo is already linked will result in the /usr/local/bin/a symlink being deleted!

@jacknagel

Kinda related: #12778

At least, there is some discussion about unlinking things that don't resolve into the correct keg.

@ghost

Does anybody mind if I try to "take a stab" at this ?

@mistydemeo

Actually, the original issue is taken care of. Unlinking will no longer remove symlinks that resolve into other kegs. I'll close this issue given that.

Thanks for the offer of help though, really appreciate it!

@mistydemeo mistydemeo closed this Aug 3, 2013
@xu-cheng xu-cheng locked and limited conversation to collaborators Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.