OnWorks Linux and Windows Online WorkStations

Logo

Free Hosting Online for WorkStations

< Previous | Contents | Next >

Dependencies: the Depends Field‌‌


The package dependencies are defined in the Depends field in the package header. This is a list of conditions to be met for the package to work correctly—this information is used by tools such as apt in order to install the required libraries, in appropriate versions fulfilling the dependencies of the package to be installed. For each dependency, you can restrict the range of versions that meet that condition. In other words, it is possible to express the fact that you need the package libc6 in a version equal to or greater than “2.15” (written “libc6 (>= 2.15)”). Version comparison operators are as follows:

<<: less than;

<=: less than or equal to;

=: equal to (note that “2.6.1” is not equal to “2.6.1-1”);

>=: greater than or equal to;

>>: greater than.


In a list of conditions to be met, the comma serves as a separator, interpreted as a logical “AND.” In conditions, the vertical bar (“|”) expresses a logical “OR” (it is an inclusive “OR,” not an ex- clusive “either/or”). Carrying greater priority than “AND,” you can use it as many times as nec- essary. Thus, the dependency “(A OR B) AND C” is written A | B, C. In contrast, the expres- sion “A OR (B AND C)” should be written as “(A OR B) AND (A OR C)”, since the Depends field does not tolerate parentheses that change the order of priorities between the logical operators “OR” and “AND”. It would thus be written A | B, A | C. See http://www.debian.org/doc/ debian-policy/ch-relationships.html for more information.

The dependencies system is a good mechanism for guaranteeing the operation of a program but it has another use with meta-packages. These are empty packages that only describe dependencies. They facilitate the installation of a consistent group of programs preselected by the meta-package maintainer; as such, apt install meta-package will automatically install all of these programs using the meta-package’s dependencies. The gnome, kde-full, and kali-linux-full packages are exam- ples of meta-packages.


Top OS Cloud Computing at OnWorks: