-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
keg: create symlinks in opt for formula aliases #1192
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
|
based on that test run, it sure looks like it will need to be bootstrapped with the existing ones rebuilt against the versioned name |
|
CC @Homebrew/maintainers for thoughts on this change and @penman too. |
|
Could someone write up the rationale behind this change? I see discussions in team chat but not everyone read transcripts after the fact, and @alyssais (looks like the handle changed) doesn't have access to that. |
|
The existing bottles are linked against opt/boost not opt/[email protected]. So renaming boost to [email protected] breaks them. The alternatives are not to rename boost to [email protected] and just to go from boost to [email protected] (that pattern is already underway with openssl), or have duplicate boost and [email protected] formulae alongside [email protected], until dependents are transferred from boost to [email protected] or [email protected], and then delete the duplicate boost formula, and create a boost alias instead. |
|
Do we want to limit opt linking for aliases to @ formulae only? Having both |
|
I like the idea that there's nothing special about @ formulae (that they're just normal aliases), but that could definitely end up not being practical. |
|
@alyssais I agree with you. I think we'll want a full-on DSL for this stuff at some point relatively soon hehe |
|
I think this looks good. Is it cool if I make a couple of comments on the code? |
|
of course! based on that |
Ah, sure. I'll wait a bit until that's resolved then. :) |
I agree with this. |
This would be my recommendation, FWIW. |
|
Although we need to resolve the issues around |
Even if that's the case I think this alias change would be a good one. |
|
Yes, I have no issues with aliases also being in |
Library/Homebrew/keg.rb
Outdated
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.
Can do the each even if empty? as it'll be a no-op.
Library/Homebrew/keg.rb
Outdated
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.
Can get this from Formula#aliases (which also handles the no-tap case)
Library/Homebrew/keg.rb
Outdated
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, aliases.each is a no-op if this is empty so you can just use .each without the check.
Library/Homebrew/keg.rb
Outdated
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.
Will a symlink? not always exist??
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.
Broken symlinks return false for exist?
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.
TIL.
|
@MikeMcQuaid I'm not sure it matters but do you prefer |
|
@ilovezfs Then latter just in case people are relying on being able to follow one layer of symlinks to find the Cellar 👍 |
|
There's some test failures but code and local testing look good to me. |
|
@ilovezfs Thoughts on this? Shout if you want help with test failures. |
in case people expect to be able to find the prefix by only resolving the symlink once (e.g., if they're using readlink not realpath)
38e525e to
dfa2c24
Compare
|
@MikeMcQuaid this has introduced a bug for anything that has an alias but was installed before this PR shipped: |
|
@ilovezfs Working on it. |
No description provided.