-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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
Fix casks with depends_on
that reference pre-Yosemite
#58046
Comments
I was trying to uninstall the |
@vitorgalvao I remember that we had a conversation with @core-code about trying 'us' trying to support as many releases of Maybe we should have it a harder requirement of only supporting the last two releases of We should consider that we're talking ~31% of users; which are on something different from the last two releases of |
@Rand-all This specific lack of support for pre-Maverick is now enforced in the core, with the release of Homebrew 2.0.0 (today!). |
@vitorgalvao Yea I saw about an hour after I wrote that...haha! 👍 So should we start to delete the support off casks? |
I think we can safely remove |
@reitermarkus 🧞♂️It shall be done, then... |
By the way, if you have edited your
Be sure to use BSD /usr/bin/find "$(brew --prefix)/Caskroom/"*'/.metadata' -type f -name '*.rb' -print0 | /usr/bin/xargs -0 /usr/bin/sed -i '' '/depends_on macos:/d' |
Thank you @felker. Added |
Is there something that can be done from the HBC side to prevent folks having to deal with this? |
Old casks (i.e. the ones in
There’s an issue I’m not finding where we spitballed more ideas. It’s not #49716, though that one also has some of them. |
If I sub a PR to brew that would check if the metadata file exists and update it to work with the current release without causing issues, is that something that would be desired? |
The problem isn’t metadata files not existing; it’s that they exist but are old (i.e. use deprecated features). Replacing them with the current release outright would defeat the purpose — we want those old instructions, which is why we keep the files. I see option 2 as more desirable, because that would decouple the uninstall (and zap) instructions from cask functionality, meaning they’ll be resilient to DSL changes. Even so, before making a PR it would be desirable to open an issue to discuss the exact solution. |
My proposal is basically just to run the sed pipe you provided on the metadata file (for installed casks only, yea?) on |
@brianmorton Ah, yes, my suggestion was about fixing it for every future case. I don’t think a fix for this particular one is necessary. The issue seems to be doing its job — people are finding it OK and not opening too many issues about it. |
The suggested command breaks Onyx, because it defines dependencies in an array.
|
When I opened #57996, the old versions were referenced incorrectly ( |
No need for a script, that should be part of |
This comment has been minimized.
This comment has been minimized.
@zubrakadzo Run the line in the top post. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Updated the top one-liner to cover multi-lines cases enclosed by |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@cypher004 The solution is in the top post. Please read before posting. There haven’t been any meaningful comments in this issue for a while, so I’ll lock it. |
depends_on
that reference pre-Mavericksdepends_on
that reference pre-Yosemite
If you get an error of the type
Error: Cask 'hex-fiend-beta' definition is invalid: invalid 'depends_on macos' value: ":lion"
, wherehex-fiend-beta
can be any cask name, and:lion
any macOS release name, run the following command:This will remove all
depends_on macos
references of installed casks (where it doesn’t matter anymore anyway).We should deal with these cases better in the future.
The text was updated successfully, but these errors were encountered: