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

using depends_on for intra-Cask dependencies and metapackages #2001

Closed
rolandwalker opened this issue Dec 8, 2013 · 3 comments
Closed

using depends_on for intra-Cask dependencies and metapackages #2001

rolandwalker opened this issue Dec 8, 2013 · 3 comments

Comments

@rolandwalker
Copy link
Contributor

Adding depends_on would not seem to be worth the effort for the small number of Casks with hard dependencies. (example: sshfs.rb depends on osxfuse.rb)

However, using a dependency framework for metapackages might be generally useful. I describe one such case in #1999.

Edit: Ruby thoughtfully provides TSort for the hard part.

Edit: depends_on :cask will be stubbed in the DSL in #4896.

Edit (by @ndr-qef): depends_on :cask has been implemented in #8491.

@rolandwalker rolandwalker changed the title depends_on using depends_on for intra-Cask dependencies and metapackages Jun 19, 2014
rolandwalker added a commit to rolandwalker/homebrew-cask that referenced this issue Jun 19, 2014
For forward-compatibility, intentionally undocumented.  Currently
works only as a synonym: `depends_on :formula` substitutes for
`depends_on_formula`, which is intended to be removed.

However, this PR also provides additional `depends_on` keys for
future expansion of functionality:
 - `:cask`
 - `:macos`
 - `:arch`
 - `:x11`
 - `:java`

The symbol names were chosen to match those used in Homebrew Formulae.

References: Homebrew#4688, Homebrew#2001
@tapeinosyne tapeinosyne self-assigned this Dec 2, 2014
@tapeinosyne
Copy link
Contributor

Verbatim from #8492:

Hard Cask dependencies can be used to create “metacasks” (#2001), which would be artifact-less Casks solely bundling other Casks. Such metacasks would serve the purpose of both automation (#6537, #5427, #6537) and unification of fragmented upstream packages (#1999).

(From here on, I will refer to the “metacask” as “Cask bundle”, after the deprecated brew bundle command.)

A terse approach would be to deem a Cask valid if it includes:

  • any number of depends_on, and
  • no artifact-related stanzas (installer, container, checksum, url, gpg…).

Alternatively, we could explicitly mark Cask bundles with a boolean stanza akin to stage_only, e.g. bundle:

cask :v1 => 'metacask' do
  bundle true

  # optionally
  version 'x.y'
  homepage '…'

  # payload
  depends_on :cask => '…'
  depends_on :cask => ['…', .. , '…']
  
end

Beyond the DSL, we should define the behavior of Cask bundles in normal operations. Namely:

  • Staging
    It may appear unnecessary to stage a Cask bereft of artifacts, but doing so will likely prove useful for the brew cask upgrade of Cask bundles, as described in Cask groups #4973 (comment).
  • Uninstallation
    Similarly, assuming upgrades, the most desirable uninstall behavior for a Cask bundle would likely be to “unsubscribe” from additions, leaving previously installed dependencies intact.

@nicolas-brousse
Copy link
Contributor

Two others alternatives that could be nice also :

cask :v1 => 'my-metacask', :type => :bundle do
  
end

Or

metacask :v1 => 'my-metacask' do # Or bundle :v1 => 'my-metacask' do
  
end

Else, for the Staging and Uninstallation I'm agree. But about the Uninstallation it could be complicated to define what is installed before. If a Cask depends_on two metacask how could make the difference?

@vitorgalvao vitorgalvao added enhancement core Issue with Homebrew itself rather than with a specific cask. labels Jul 25, 2015
@vitorgalvao
Copy link
Member

Closing for lack of interest.

@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

5 participants