Drew Taylor writes:
> Perhaps this is a stupid question, but could someone explain the difference 
> between a disk image (dmg) and a package (pkg)? I know the dmg "mounts" a 
> virtual drive, but other than that which is better?

A .dmg is a file containing a filesystem, kinda like a .iso for CD-ROM
filesystems.  A .dmg can contain programs that you run directly from
the disk image.  This is how Mozilla is shipped--no installer, just a
folder you drag to your Applications directory.  A .dmg doesn't even
have to contain programs--I could ship a .dmg of images, text files,
anything.

A .pkg is specifically just a distribution of files to be installed
using the Installer program.  You can add pre- and post- actions to a
package (which I should have done for Perl--update your .cshrc to add
/usr/local/perl5-8 to the path).  The prompting for admin password,
confirming acceptance of the license, selecting the drive to install
on ... all that's done by the Installer program in response to
instructions in the .pkg file.

I used .pkg instead of .dmg because Perl's location is hard-coded in
the binary, so it *has* to go into /usr/local/perl5-8.  If I'd just
given you a filesystem, you could have copied it anywhere and then
filled my mailbox with "you suck, Torkington!" email :-)

Nat

Reply via email to