Читаем The Debian Administrator's Handbook полностью

5.2.1. Description: the control File

This file uses a structure similar to email headers (as defined by RFC 2822). For example, for apt, the control file looks like the following:

apt-cache show apt

Package: apt

Priority: important

Section: admin

Installed-Size: 5612

Maintainer: APT Development Team 

Architecture: i386

Version: 0.8.0

Replaces: manpages-pl (<< 20060617-3~)

Provides: libapt-pkg4.10

Depends: libc6 (>= 2.3.4), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.4.0), zlib1g (>= 1:1.1.4), debian-archive-keyring, gnupg

Suggests: aptitude | synaptic | wajig, dpkg-dev, apt-doc, bzip2, lzma, python-apt

Conflicts: python-apt (<< 0.7.93.2~)

Filename: pool/main/a/apt/apt_0.8.0_i386.deb

Size: 1965454

MD5sum: 43364819b898e49b8175e88ec5787241

SHA1: 350a8a7a43fe182d54f3b7d73b8032f85b5d7ddf

SHA256: a593e7d7f9b3cffa37770201a3c13bd2c8bc588bafbf39b4aaa5e13b5fb00b8b

Description: Advanced front-end for dpkg

 This is Debian's next generation front-end for the dpkg package manager.

 It provides the apt-get utility and APT dselect method that provides a

 simpler, safer way to install and upgrade packages.

 .

 APT features complete installation ordering, multiple source capability

 and several other unique features, see the Users Guide in apt-doc.

Tag: admin::package-management, hardware::storage, hardware::storage:cd, interface::commandline, network::client, protocol::{ftp,http,ipv6}, role::program, suite::debian, use::downloading, use::searching, works-with::software:package

BACK TO BASICS RFC — Internet standards

RFC is the abbreviation of “Request For Comments”. An RFC is generally a technical document that describes what will become an Internet standard. Before becoming standardized and frozen, these standards are submitted for public review (hence their name). The IETF (Internet Engineering Task Force) decides on the evolution of the status of these documents (proposed standard, draft standard, or standard).

RFC 2026 defines the process for standardization of Internet protocols.

→ http://www.faqs.org/rfcs/rfc2026.html

5.2.1.1. Dependencies: the Depends Field

The 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 their appropriate versions, that the program to be installed depends on. For each dependency, it is possible to restrict the range of versions that meet that condition. In other words, it is possible to express the fact that we need the package libc6 in a version equal to or greater than “2.3.4” (written “libc6 (>= 2.3.4)”). Version comparison operators are as follows:

<<: less than;

<=: less than or equal to;

=: equal to (note, “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. In logic, its meaning would be interpreted as “and”. In conditions, the vertical bar (“|”) expresses “or” in logic (it is an inclusive “or”, as opposed to meaning “either/or”). Carrying greater priority than “and”, it can be used as many times as necessary. Thus, the dependency “(A or B) and C” is written A | B, C. In contrast, the expression “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.

→ http://www.debian.org/doc/debian-policy/ch-relationships.html

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-get install meta-package will automatically install all of these programs using the meta-package's dependencies. The gnome, kde and linux-image-2.6-686 packages are examples of meta-packages.

DEBIAN POLICY Pre-Depends, a more demanding Depends

“Pre-dependencies”, which are listed in the “Pre-Depends” field in the package headers, complete the normal dependencies; their syntax is identical. A normal dependency indicates that the package in question must be unpacked and configured before the package declaring the dependency. A pre-dependency stipulates that the package in question must be unpacked and configured before execution of the pre-installation script of the package declaring the pre-dependency, that is before its installation.

Перейти на страницу:

Похожие книги