DOSE-DISTCHECK(1) | DOSE Tools | DOSE-DISTCHECK(1) |
distcheck - check installability of packages according to metadata
distcheck determines, for a set of package control stanzas, called the repository, whether packages of the repository can be installed relative to the repository according to the inter-package relationsships expressed in the package control stanzas. The exact set of relevant control fields and their meaning depends on the type of the repository. The constraint solving algorithm is complete, that is it finds a solution whenever there exists one, even for multiple disjunctive dependencies and deep package conflicts. This problem is computationally infeasible in theory (that is, NP-complete), but can be solved very efficiently for package repositories that actually occur in practice.
Packages are split into foreground and background: only packages in the foreground are checked for installability, but dependencies may be satisfied by foreground packages and by background packages. By default, all packages are in the foreground.
Currently supported input types are debian, rpm, and eclipse. The distcheck tool expects its input specifiations in the form type://pathname where type is one of deb, synthesis, hdlist or eclipse, and pathname is the pathname of a file containing the input. The package metadata found in that file must correspond to the type given in the URI.
When invoked as typecheck then the type of input is assumed to be type, and repositories (in positional arguments or in the values of options --fg and --bg) are simply given in form of a pathname of a file containing the repository. If no positional argument is given then input is read from standard input. distcheck also accepts compressed files (.gz , .bz2) as positional arguments. Input read on standard input cannot be in compressed form.
The input file has to contain stanzas in the format of deb-control(5), separated by one blank line. For instance, the Packages files as found on a Debian mirror server, or in the directory /var/lib/apt/lists/ of a Debian system, are suitable as input to debcheck. Installability of packages is analyzed according to their Depends, Conflicts, and Provides fields with their meaning as of Debian policy version 3.9.0. Pre-depends are treated like Depends, and Breaks are treated like Conflicts.
If the input contains several packages with the same values of name, version, and architecture than only the last of these is taken into account, and a warning is issued.
In the case of Debian, it is not possible to install at the same time two packages with the same name but different versions.
The input file can be either a synthesis file or a hdlist file. By default rpmcheck expects a synthesis file as input. To specify a hdlist file distcheck must be invoked with a file argument of the form hdlist://
The input file is a 822 encoding of an npm repository.
The input file is a 822 encoding of an opam repository.
The input is a generic 822 file. Versions are compared by default using the debian comparing function, or if provided the function specified by --compare
The input is a 822 file containing the encoding of OSGi plugins content.xml files.
Example: --coinst "a (>1), b"
If we have package a in versions 1, 2 and 3, and package b in versions 11 and 12, then this will check 4 pairs of packages for co-installability, namely (a=2,b=11), (a=2,b=12), (a=3,b=11) and (a=3,b=12).
Example: --checkonly "libc6 , 2ping (= 1.2.3-1)"
Multi-arch annotations are correctly considered by distcheck. Packages whose's architecture is neither the native architecture nor in the list of foreign architectures (see below) are ignored.
Exit codes 0-63 indicate a normal termination of the program, codes 64-127 indicate abnormal termination of the program (such as parse errors, I/O errors).
In case of normal program termination:
- exit code 0 indicates that all foreground packages are found installable;
- exit code 1 indicates that at least one foreground package is found uninstallable.
Check which packages in a particular distribution are not installable and why:
dose-distcheck -v -f -e \ --bg deb:///var/lib/apt/lists/ftp.fr.debian.org_debian_dists_sid_main_binary-amd64_Packages\ --bg deb:///var/lib/apt/lists/ftp.fr.debian.org_debian_dists_sid_non-free_binary-amd64_Packages\ --fg deb:///var/lib/apt/lists/ftp.fr.debian.org_debian_dists_sid_contrib_binary-amd64_Packages
where Packages is the file pertaining to that distribution, as for instance found in the directory /var/lib/apt/lists.
Check which packages in contrib are not installable when dependencies may be satisfied from main:
debcheck --failures --bg=main_Packages contrib_Packages
Distcheck is a complete reimplementation of edos-debcheck, written for the EDOS project.
The first version of debcheck was written by Jerome Vouillon for the EDOS project. The current version has been rewritten on the basis of the dose3 library by Pietro Abate.
deb-control(5)
<http://www.edos-project.org> is the home page of the EDOS project.
<http://www.mancoosi.org> is the home page of the Mancoosi project.
2024-04-10 |