Free Hosting Online for WorkStations

< Previous | Contents | Next >

Provided Items: the Provides Field‌


This field introduces the very interesting concept of a virtual package. It has many roles, but two are of particular importance. The first role consists in using a virtual package to associate a generic service with it (the package provides the service). The second indicates that a package completely replaces another and that for this purpose, it can also satisfy the dependencies that the other would satisfy. It is thus possible to create a substitution package without having to use the same package name.



Meta-Package and Virtual It is essential to clearly distinguish meta-packages from virtual packages. The for-

Package mer are real packages (including real .deb files), whose only purpose is to express dependencies.

Virtual packages, however, do not exist physically; they are only a means of identify- ing real packages based on common, logical criteria (for example, service provided, or compatibility with a standard program or a pre-existing package).

Meta-Package and Virtual It is essential to clearly distinguish meta-packages from virtual packages. The for-

Package mer are real packages (including real .deb files), whose only purpose is to express dependencies.

Virtual packages, however, do not exist physically; they are only a means of identify- ing real packages based on common, logical criteria (for example, service provided, or compatibility with a standard program or a pre-existing package).


Providing a Service Let’s discuss the first case in greater detail with an example: all mail servers, such as postfix or sendmail are said to provide the mail-transport-agent virtual package. Thus, any package that needs this service to be functional (e.g. a mailing list manager, such as smartlist or sympa) simply states in its dependencies that it requires a mail-transport-agent instead of specifying a large yet incomplete list of possible solutions. Furthermore, it is useless to install two mail servers on the same machine, which is why each of these packages declares a conflict with the mail-transport-agent virtual package. A conflict between a package and itself is ignored by the system, but this technique will prohibit the installation of two mail servers side by side.

Interchangeability with Another Package The Provides field is also interesting when the con- tent of a package is included in a larger package. For example, the libdigest-md5-perl Perl module was an optional module in Perl 5.6, and has been integrated as standard in Perl 5.8. As such, the package perl has since version 5.8 declared Provides: libdigest-md5-perl so that the dependencies on this package are met if the system has Perl 5.8 (or newer). The libdigest-md5-perl package itself was deleted, since it no longer had any purpose when old Perl versions were removed.



Figure 8.3 Use of a Provides Field in Order to Not Break Dependencies


This feature is very useful, since it is never possible to anticipate the vagaries of development and it is necessary to be able to adjust to renaming, and other automatic replacement, of obsolete software.


Top OS Cloud Computing at OnWorks: