Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Allow formula to specify directories that must be directories and not symlink during link step #62

Closed
adamv opened this issue Sep 25, 2009 · 7 comments

Comments

@adamv
Copy link
Contributor

adamv commented Sep 25, 2009

SDL gets its headers linked to /usr/local/include/SDL.
The SDL_mixer project wants to add a single include /usr/local/include/SDL/SDL_mixer.h

If you install SDL and then SDL_mixer, the latter's symlink will override SDL's symlink, so your include/SDL folder will ONLY have the mixer include.

There are a few ways to handle this:

  • Bake the SDL_mixer install into SDL (may not be so bad)
  • Use a custom path for SDL_mixer, and then fix up dependent formulas to know about it (ugh)
  • Add new infrastructure to support this (design decisions needed there)
@adamv
Copy link
Contributor Author

adamv commented Sep 26, 2009

I routed around this like so:

http://github.com/adamv/homebrew/commit/5a4fca42057895823b5c244fb7ddd68421b70d7a

Feel free to close this bug, though if you like the approach I used in that formula, I can document it on the wiki.

@mxcl
Copy link
Contributor

mxcl commented Sep 28, 2009

Indeed this is a case when we need to allow the formula to interact with the linking behaviour. Should be doable.

@mxcl
Copy link
Contributor

mxcl commented Sep 29, 2009

Actually the better solution here perhaps is that when linking, if the directory is already linked to another formula, remove the link, link in all the files inside that dir and continue.

@sophiebits
Copy link
Contributor

Is there a reason why we can't just recreate the entire directory structure and just symlink the individual files? Seems like it would be more consistent, but possibly a bit more messy.

@mxcl
Copy link
Contributor

mxcl commented Sep 30, 2009

Well I decided way back to symlink dirs if possible to save on the number of symlinks you have to create.

Eg with boost, symlinking the include/boost directory rather than everything in that directory saves over 3000 symlinks.

@mxcl
Copy link
Contributor

mxcl commented Oct 19, 2009

Almost finished this patch.

@mxcl
Copy link
Contributor

mxcl commented Oct 23, 2009

Allow multiple formula to symlink the same directory

During the link step, if the destination symlink already exists, unlink it, and create a directory instead, then relink the original contents. Then continue linking the formula in question.

Closed by 5c54f57

Sharpie pushed a commit to Sharpie/homebrew that referenced this issue Sep 19, 2011
During the link step, if the destination symlink already exists, unlink it, and create a directory instead, then relink the original contents. Then continue linking the formula in question.

Fixes Homebrew#62
etehtsea pushed a commit to etehtsea/homebrew that referenced this issue Dec 27, 2011
During the link step, if the destination symlink already exists, unlink it, and create a directory instead, then relink the original contents. Then continue linking the formula in question.

Fixes Homebrew#62
samueljohn pushed a commit to samueljohn/homebrew that referenced this issue Oct 10, 2012
Closes Homebrew#62.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
snakeyroc3 pushed a commit to snakeyroc3/homebrew that referenced this issue Dec 17, 2012
During the link step, if the destination symlink already exists, unlink it, and create a directory instead, then relink the original contents. Then continue linking the formula in question.

Fixes Homebrew#62
lumaxis pushed a commit to lumaxis/homebrew that referenced this issue Feb 17, 2015
Python support in Homebrew is tricky to get right, and the way the
most-recent versions of Python 2.7.x and 3.x are handled in core
change over time.

These older versions of Python have not kept up-to-date with these
layout changes, and have installation problems as-is.

In addition, these versions may not be getting important security
updates any more.

Removing these from the versions repo; if they are still needed
by any users they should be handled in a (different) external tap.

Closes Homebrew#84.
Closes Homebrew#62.
Closes Homebrew#229.
Closes Homebrew#167.
Closes Homebrew#27208
@Homebrew Homebrew locked and limited conversation to collaborators Feb 16, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants