Virtual packages
Next to the usual packages, DEB also has the notion of virtual packages. These packages do not physically exist, but they can be used in dependencies; a dependency on a virtual package can be fulfilled by any package that provides te virtual package. For example, suppose that a package A needs a web server to run, but it doesn't matter which particular web server. In that case, one could declare package A to depend on a virtual package webserver. Then, in order to specify which packages can fulfill the webserver dependency, all web server packages (apache, ...) can be declared to provide the webserver package. Virtual packages do not have versions (though the packages providing them, of course, do); according to the Debian Policy Manual, though, the possibility may be added in future versions of the DEB format.DEB package format
A DEB package is an ar(1) archive, which contains the following files:- debian-binary
- control.tar.gz (the metadata)
- data.tar.gz (the package data)
- Package: the package name
- Version: the package version
- Architecture: this package runs on a specific architecture
- Depends: run-time dependencies (dependencies that are needed to run the package)
- Pre-Depends: install-time dependencies (dependencies that are needed to install the package, for example an archiving tool)
- Conflicts: conflicting dependencies
- Provides: this package can fulfill a virtual dependency.
- Replaces: this package replaces another version.
- Package A must be installed with a version strictly greater than 2.63
- Either package B (version 2.4) or package B (version greater than or equal to 5.99a) must be installed
- Package C (version strictly less than 0.27-beta) must be installed.
- Package E must be installed, in any version (or perhaps E is a virtual package)
Example: ocaml
Here is the control file of the ocaml package (version 3.08.3-3 for i386):Package: ocaml Version: 3.08.3-3 Section: devel Priority: optional Architecture: i386 Depends: ocaml-base (= 3.08.3-3), ocaml-base-3.08.3, ocaml-nox-3.08.3 Suggests: xlibs-dev, tcl8.4-dev, tk8.4-dev Provides: ocaml-3.08.3 Installed-Size: 6940 Maintainer: Sven LutherWe see that this package is named ocaml, it has version 3.08.3-3, it is meant for the i386 architecture, and it depends on three packages: ocaml-base (version 3.08.3-3), ocaml-base-3.08.3 and ocaml-nox-3.08.3. Furthermore, it provides the virtual package ocaml-3.08.3.Description: ML language implementation with a class-based object system Objective Caml is an implementation of the ML language, based on the Caml Light dialect extended with a complete class-based object system and a powerful module system in the style of Standard ML. . Objective Caml comprises two compilers. One generates bytecode which is then interpreted by a C program. This compiler runs quickly, generates compact code with moderate memory requirements, and is portable to essentially any 32 or 64 bit Unix platform. Performance of generated programs is quite good for a bytecoded implementation: almost twice as fast as Caml Light 0.7. This compiler can be used either as a standalone, batch-oriented compiler that produces standalone programs, or as an interactive, toplevel-based system. . The other compiler generates high-performance native code for a number of processors. Compilation takes longer and generates bigger code, but the generated programs deliver excellent performance, while retaining the moderate memory requirements of the bytecode compiler. It is not available on all arches though. . This package contains everything needed to develop ocaml applications, including the graphics libraries.
The APT tool
The APT tool is written in C++ and uses an ad-hoc, backtracking algorithm for finding an installation recipe. This algorithm, altough it is fast, is incomplete and incorrect. Also, the maintainers assume APT works in a particular way and give hints in the dependency information, for helping APT solve the dependencies, and also for prioritizing packages.- apt-get install abiword-gnome=2.2.7-3 fails, but abiword-gnome=2.2.7-3 is installable
- apt-get install abiword-gnome=2.2.7-3 abiword-common=2.2.7-3 succeeds, installing libaspell15c2
- apt-get install abiword-common=2.2.7-3 abiword-gnome=2.2.7-3 succeeds, but does not deem necessary to install libaspell15c2.
Version 1.4 last modified by Berke on 17/11/2005 at 09:45
Document data
Attachments:
No attachments for this document
Comments: 0