Datasheet

73
Chapter 4 Software Management
Binary packages are not without their drawbacks, however. Notably, they tend to
require more ancillary software to be installed because disabling the use of this
software must be done with the source code. In the interests of making the package
applicable to the widest audience, most of the knobs that control the use of exter-
nal software are turned all the way up.
Debian is a binary-based distribution. It was decided long ago that the tradeoffs for
using a binary packaging format far outweighed the added flexibility gained by
requiring users to compile each and every bit of software on their system. Debian
does distribute source packages, though: Each binary package in Debian that the
user installs has an associated source package from which the binary package is
built. So while Debian’s primary means of providing software for installation is via
binary packages, users who really need to change compile-time settings can do so
without too much trouble.
Dependencies
Whether dealing with source packages or binary packages, another common theme
is dependencies, or more generally, package relationships. Over the years, more and
more common tasks have been moved into shared libraries code that each devel-
oper can use instead of writing their own each time. Every time this happens, a
dependency is created.
Package relationships in their most common form allow a package to declare a
dependency on another package. A calculator might declare a dependency on a
library containing common math functions. Graphical applications would declare a
dependency on a common graphical user interface toolkit library. Though depen-
dencies, as they’re called, are the most widely understood and implemented pack-
age relationships, they’re not the only kind. In advanced packaging systems like
Debian’s, packages can also declare a number of other relationships (see the list of
possible relationships in the “Package relationships” section of this chapter).
Installation scripts
Aside from containing the software itself, as well as declaring any dependencies or
other package relationships, packages typically include installation scripts. These
are small programs that act on the user’s machine in a fairly intelligent manner.
These scripts might migrate configuration files to new locations or upgrade configu-
ration files to new versions. They might print a warning telling the user to be care-
ful with a particularly dangerous piece of software. Because these are programs in
their own right typically small, but not necessarily they’re the active portion of
a given package.
Debian’s packages
As I hinted in the previous subsection, Debian’s package management system is
quite advanced. It’s been evolving for a decade and has been continually refined,
though that’s not to say it’s the be-all and end-all of package management. However,
09_576445 ch04.qxd 7/5/05 3:10 PM Page 73