Skip to content
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

depends_on :cask follow-ups #8492

Closed
4 of 5 tasks
tapeinosyne opened this issue Dec 29, 2014 · 17 comments
Closed
4 of 5 tasks

depends_on :cask follow-ups #8492

tapeinosyne opened this issue Dec 29, 2014 · 17 comments

Comments

@tapeinosyne
Copy link
Contributor

Post-release of #8491, we are free to proceed with:

  • Adding dependencies to compatible Casks
    In the main repository:
    • cryptol
    • qgis
    • sshfs

Note that Cask dependencies are only available in master, and caveats concerning dependencies must remain intact until release of v0.52.0.

@jawshooah
Copy link
Contributor

In reference to automation, i.e. using "metacasks" as a stand-in for the deprecated brew bundle command, what would the suggested workflow be?

My guess: fork homebrew-cask, brew cask create my-caskfile, and fill in dependencies from any existing Caskfile, substituting cask install dependency with depends_on :cask => 'dependency'.

@tapeinosyne
Copy link
Contributor Author

That would be more contrived than necessary: homebrew-cask is happy to install from files (brew cask install /path/to/metacask.rb) and taps (brew cask install username/tap-suffix/metacask). The first approach is particularly suitable for simple automation, e.g. as fashioned after dotfiles.

@rolandwalker
Copy link
Contributor

We also need to relax the DSL somehow for metacasks, which don't need url, homepage, etc.

@nicolas-brousse
Copy link
Contributor

I'm not sure if it's the right place, but there is a problem with the onyx cask.

It appear the problem is on line 15 in /usr/local/Cellar/brew-cask/0.52.0/rubylib/hbc/cask_dependencies.rb file.
deps return nil:NilClass.

Error: undefined method `each' for nil:NilClass

I have tried with this https://gist.github.com/nicolas-brousse/fb3edb9815a8ad03cf00 cask.

$ brew cask install https://gist.githubusercontent.com/nicolas-brousse/fb3edb9815a8ad03cf00/raw/b5d076f1efaab3ec684b952fe12723c5a50a94cc/common-group.rb.

@vitorgalvao
Copy link
Member

@nicolas-brousse Please open a new issue instead. Your syntax is wrong on the gist, though. It should be depends_on :cask => <cask-name>.

@nicolas-brousse
Copy link
Contributor

@vitorgalvao Ok. Sorry and thank you.

@vitorgalvao
Copy link
Member

I was never convinced by the idea of metacasks as a replacement for brew bundle, but I was never convinced by brew bundle either.

However, while working on #8698, the idea of metacasks made some sense.

I’m saying this only as a possible argument for consideration, as I’m still not really convinced of their overall usefulness (they do seem to be desired, though, and that has weight).

@nicolas-brousse
Copy link
Contributor

In my opinion metacasks and brew bundle are two different things.

metacask
metacasks are only group of casks. It could be very useful for company usage (mainly). With it, installing a new computer could be very simple by choosing what kind of metacask you want to install (devops-matacask for example). And like this it's also an easy way to have computer up-to-date by "groups". Like I explain it into #4973 (comment), with this tool it could be very simple to add a software into the company's workflow.

Sure there is some other tools to do something like that but I found these others tool more fat than caskroom.io is. Homebrew cask is very light and simple, and it is really enough :)

brew bundle
brew bundle is also useful for project I think. Sure homebrew have removed it, but I continue to use it. Because for project I found nice to have a file who list the needed packages. For example if for a specific project we need to use memcached or imagemagick, we can add it in Brewfile and be sure the team know what is needed.
It's just my opinion for brew bundle.

So for me it's not a replacement but something additional to Homebrew cask.

@vitorgalvao
Copy link
Member

I still see absolutely no value in brew bundle. There’s nothing it does that can’t be accomplished just as well (and fast) with a simple shell script.

bundle() {
  sed '/^\s*$/d;s/^/brew /' "$1" | sh
}

There. A bash function that’ll take a file as an argument, and do what brew bundle did.

@nicolas-brousse
Copy link
Contributor

Yes, you are right for brew bundle. It could be on an install.sh file at the root of the project.

It's not really on this part I am attached but I am on the metacasks part.

@MikeMcQuaid
Copy link
Member

Again, I recommend https://github.com/andrew/brewdler. I'm going to work on making getting this more officially supported soon.

It uses a decent DSL which describes what the result should be rather than just a stupid list of commands. The previous approach was extremely error-prone and I'd really recommend against implementing anything similar in future.

Metacasks solve a problem but they aren't really a elegant solution. What you really want is something like a Brewfile that lives in a repository root and can be used to bootstrap the contents of a project. IMO telling people in the docs to manually run brew cask install metafoo is a bit of a smell.

@jawshooah
Copy link
Contributor

Agreed. As long as it continues to be actively maintained, I'm all for letting Brewdler do the legwork here.

@vitorgalvao
Copy link
Member

It uses a decent DSL which describes what the result should be rather than just a stupid list of commands.

That is good to know. That way I can see value in it.

Metacasks solve a problem (…)

Well, they solve two, actually, but lets outsource one of those to brewdler1 and focus on the other one. They also allow an easy way to bundle casks that would many times be desirable together. Among them [families of typefaces](font Google Cousine) and scripts that work well together (but don’t necessarily require each other to work). Those should be included in the official repos, not used as personal files.

Having said that, I don’t really care much either way for metacasks and would be fine with either decision. I’m simply pointing out they do have a utility.


1 I don’t really think metacasks are a replacement for bundle, either

@MikeMcQuaid
Copy link
Member

Think we're agreed here 👍

@vitorgalvao
Copy link
Member

Another use case for metacasks: cask aliases. Referenced in #8938 (comment) and (to an extent, maybe) #9174.

@MikeMcQuaid
Copy link
Member

We now have an officially blessed Homebrew implementation that also has cask support: https://github.com/Homebrew/homebrew-brewdler

@adidalal
Copy link
Contributor

adidalal commented Jan 3, 2016

https://github.com/Homebrew/homebrew-bundle has Cask support, as @MikeMcQuaid stated, which fulfills the purpose of "Metacasks" (and closes out discussion on this issue)

@adidalal adidalal closed this as completed Jan 3, 2016
@miccal miccal removed core Issue with Homebrew itself rather than with a specific cask. enhancement labels Dec 23, 2016
@Homebrew Homebrew locked and limited conversation to collaborators May 8, 2018
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

8 participants