07.06.2014 Views

2 - Raspberry PI Community Projects

2 - Raspberry PI Community Projects

2 - Raspberry PI Community Projects

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

5.2.1.2. Conflicts: the Conflicts field<br />

The Conflicts field indicates when a package cannot be installed simultaneously with another.<br />

The most common reasons for this are that both packages include a file containing the same<br />

name, or provide the same service on the same TCP port, or would hinder each other's operation.<br />

dpkg will refuse to install a package if it triggers a conflict with an already installed package,<br />

except if the new package specifies that it will “replace” the installed packages, in which case<br />

dpkg will choose to replace the old package with the new one. apt-get always follows your<br />

instructions: if you choose to install a new package, it will automatically offer to uninstall the<br />

package that poses a problem.<br />

5.2.1.3. Incompatibilities: the Breaks Field<br />

The Breaks field has an effect similar to that of the Conflicts field, but with a special meaning.<br />

It signals that the installation of a package will “break” another package (or particular versions<br />

of it). In general, this incompatibility between two packages is transitory, and the Breaks relationship<br />

specifically refers to the incompatible versions.<br />

dpkg will refuse to install a package that breaks an already installed package, and apt-get will<br />

try to resolve the problem by updating the package that would be broken to a newer version<br />

(which is assumed to be fixed and, thus, compatible again).<br />

This type of situation may occur in the case of updates without backwards compatibility: this is<br />

the case if the new version no longer functions with the older version, and causes a malfunction<br />

in another program without making special provisions. The Breaks field prevents the user from<br />

running into these problems.<br />

5.2.1.4. Provided Items: the Provides Field<br />

This field introduces the very interesting concept of a “virtual package”. It has many roles, but<br />

two are of particular importance. The first role consists in using a virtual package to associate a<br />

generic service with it (the package “provides” the service). The second indicates that a package<br />

completely replaces another, and that for this purpose it can also satisfy the dependencies that<br />

the other would satisfy. It is thus possible to create a substitution package without having to<br />

use the same package name.<br />

VOCABULARY<br />

Meta-package and virtual<br />

package<br />

It is essential to clearly distinguish meta-packages from virtual packages. The<br />

former are real packages (including real .deb files), whose only purpose is to<br />

express dependencies.<br />

Virtual packages, however, do not exist physically; they are only a means of<br />

identifying real packages based on common, logical criteria (service provided,<br />

compatibility with a standard program or a pre-existing package, etc.).<br />

Chapter 5 — Packaging System: Tools and Fundamental Principles<br />

81

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!