-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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 pkg installers #14
Comments
- the vagrant cask is our guinea pig - works for me - only basic testing at the moment - i wanted to push something to get the gears turning on this it turns out the concept is pretty simple. specify a list of pkgs to install; borrow the patterns from linkables for that. then basically just run "sudo installer" refs #14
Alright finally the start of a pkg installer feature! Going to see if I can get a few people trying it on Vagrant and then slowly add it to a few more casks. Slowly but surely progress! 👻 |
Works great with vagrant! |
Installation works well here, too. However, it breaks When we link apps, more than one file may need to be used, while with installers it’s only one (the installer itself) and these come usually with an uninstaller ( We should never have more than one installer and one uninstaller, so if there are two options, it'd assume the first is the installer, and the second the uninstaller. |
couldn't hurt to make it explicit, with seperate install 'Installer.pkg' and uninstall 'Uninstaller.tool' lines. I think i've seen DMGs with more than one .pkg with some Brother drivers. Maybe we could even copy the uninstaller tool to the caskroom to have it available without redownloading the whole package to remove it. |
I like the idea of trying to track uninstallers too. 👍 Let's try some syntax highlighting to get a feel for how it should look. @vitorgalvao's original suggestion: class Vagrant < Cask
url '...'
# ...
install 'Vagrant.pkg', 'Uninstall.tool'
end @Crazor's version: class Vagrant < Cask
url '...'
# ...
install 'Vagrant.pkg'
uninstall 'Uninstall.tool'
end I think I lean towards the explicit But I don't feel super strongly - I'm down to talk about other arguments too.
This already happens automatically. The Caskroom keeps everything that was in the original DMG. 😄 |
Oh I didn't notice that. I think it's not too useful to keep anything but the uninstaller around. I'm always hunting wasted disk space ever since I got that Air ;) |
Even though I sympathize with not wanting to fill the disk with stuff we probably won’t need, I don’t think it’s a viable option in this case. I say this because there are .dmg files that do come with more than just the (un)installers (optional plugins, CLI components), so getting rid of these automatically can be bad for certain casks. You might want to run Regarding syntax, I agree with specifying |
with an explicit |
Cool; we'll go with |
Since we landed this, I'm going to call this one done and split off a separate issue for finishing uninstall commands, which I'm working on |
Command line pkg install
It's definitely possible to use the
installer
tool from the command line onpkg
s. Should be able to build on some of my previous work from here:https://github.com/phinze/puppet-workstation/blob/master/modules/puppet-macosx/lib/puppet/provider/package/macapp.rb#L74-87
Target the Caskroom
The real tricky part is to see if we can get the installer to target the Caskroom path, so that we keep the sexy Homebrew isolation of packages.
I've done some initial exploratory work on this - it seems like
pkg
s can be locked down such that they can only target a root volume.There are a few strategies to try:
installer
into thinking a Caskroom path is a "volume" suitable for targetingpkg
to change the flag forcing the install to target a root volumeNow of course even if we pull this off, it may break some packages that rely on absolute path references to work. We can deal with that problem on a cask-by-cask basis.
Escalate privileges for some packages?
So if we can't do the Caskroom isolation for, say,
virtual-box
- I'd still likebrew-cask
to be able to manage that installation. So I'd like to explore whether we can havebrew-cask
pkg
have its way with the systemFun times ahead!
The text was updated successfully, but these errors were encountered: