On Apr 13, 2007, at 4:16 AM, Ryan Schmidt wrote:
True... Thanks... I guess what I should have asked is if there were any ports that download disk images and install their contents, since that's a bit more complicated. I know MacPorts knows how to extract files from .tar.gz and .tar.bz2 archives, but I'm wondering if there's anything in place for .dmg files.
Grepping all portfiles for "dmg" I only see one -- abiword -- which lets you choose either to compile from source or install a binary from a disk image. For the latter, it looks like this:
Unfortunately, you're sort of heading down a bad street here, at the end of which is a small gang of thugs with switchblades and they want your wallet. The problem with using hdiutil is that it really screws with using the port from different scenarios (like ssh'ing into a machine) where DiskArbitration cannot necessarily be contacted, or in doing automated builds. I used to run into AbiWord and at least one other port (I believe it was Chmox) mounting disk images on my build machine and then just leaving them there, so by the time the run was complete I had these extra volumes on my desktop that I couldn't unmount again because the references had gotten spooged by virtue of the fact that they got mounted from within a chroot (which was now gone), confusing all heck out of DiskArb. Unfortunately, I don't know of any true command-line tools for extracting things from disk images as if they were true archives. Sounds like a fine SoC project. :-) - Jordan