Thoughts on Package Managers: Source vs. Binary

8964

One of the things I love about Linux distros as opposed to Windows/MacOS is that we have package managers. On Windows, every piece of software comes with its own “package manager,” and even when you uninstall them, they still do a lousy job cleaning up after themselves. Macs have “packages,” but not much of a manager. Linux, though, has a wide variety of software that makes it easy to manage your installed programs. This is a series where I describe some of the attributes of package managers, and what I think should be in the Perfect Package Manager.

Today, I’m discussing one of the biggest differentiations between package managers: source packages vs. binary packages. Source package include a tarball of the application’s source code, and instructions on building it. When you install the package, it builds and compiles everything on-site, then installs. Binary packages have everything already built, and installing the package just takes everything out of it.

When I first read about source packaging systems, I thought, “Wow! This sounds really great!” By building on source, you can make sure that everything is configured properly for your system, and exact more customization upon the package. It also makes Richard M. Stallman happy, what with his constant ranting about the importance of source code. (Note: I’m not making fun of RMS here. That comes later.)

After I installed and ran an upgrade of GoboLinux, though, I took a more realistic approach to source packages. Namely, installing a binary package compared to installing a source package is like using a computer vs. using a computer while you and the mouse and keyboard are immersed in a vat of molasses. In other words, it’s slow. One person referred to Gentoo having a screensaver built in on the command line: GCC.

Having said that, binary packages have the immediate benefit of installing quickly. On my Arch Linux system, the ‘Install’ step of installing a package takes less than a second. Sometimes I don’t even see the hash marks of the progress bar appear on my screen.