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

Support .dmg.bz2 and other containerless compressed disk images #3650

Closed
lachlancooper opened this issue Mar 24, 2014 · 1 comment · Fixed by #3651
Closed

Support .dmg.bz2 and other containerless compressed disk images #3650

lachlancooper opened this issue Mar 24, 2014 · 1 comment · Fixed by #3651

Comments

@lachlancooper
Copy link
Contributor

I'm trying to install git-annex on OSX 10.8.2, where for some reason the upstream .dmg is compressed with bz2. The existing cask can't handle this, it fails with:

lachlan@velasco:~$ brew cask install git-annex
==> Caveats
Cask git-annex installs files under "/usr/local".  The presence of such
files can cause warnings when running "brew doctor", which is considered
to be a bug in homebrew-cask.

==> Downloading http://downloads.kitenet.net/git-annex/OSX/current/10.8.2_Mountain_Lion/git-annex.dmg.bz2
######################################################################## 100.0%
Error: It seems the symlink source is not there: '/opt/homebrew-cask/Caskroom/git-annex/latest/git-annex.app'

After investigating a bit I discovered nested_container and tried adding a suitable line to the cask, but now it fails in a different way:

lachlan@velasco:~$ brew cask install git-annex
==> Caveats
Cask git-annex installs files under "/usr/local".  The presence of such
files can cause warnings when running "brew doctor", which is considered
to be a bug in homebrew-cask.

==> Downloading http://downloads.kitenet.net/git-annex/OSX/current/10.8.2_Mountain_Lion/git-annex.dmg.bz2
######################################################################## 100.0%
Error: No such file or directory - /opt/homebrew-cask/Caskroom/git-annex/latest/git-annex.dmg

I haven't really looked into how nested_container works, but I'd guess this is failing because unlike, say, zip and tar.gz, bz2 and gz aren't really containers and don't contain filenames or other metadata; they're just the plain disk image file, compressed.

This issue is pretty low priority, since git-annex seems to be the only cask affected by the problem.

@rolandwalker
Copy link
Contributor

Hi! Thanks for the report!

Yes, hdiutil chokes here and refuses to recognize the DMG, because the URL is downloaded into a file which lacks the .dmg ending.

This problem is addressed by the addition of a :target key to the url stanza in #3043, which is unfortunately not finished. If that PR remains unfinished much longer, I may spin out the :target logic into a separate patch.

Luckily, there is a hack we can use to make this Cask work for the moment.

rolandwalker added a commit to rolandwalker/homebrew-cask that referenced this issue Mar 24, 2014
For non-Mavericks installs.  Also add needed nested_container
stanza.  Fixes Homebrew#3650.
@rinopo rinopo mentioned this issue Dec 7, 2015
@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

Successfully merging a pull request may close this issue.

2 participants