=head1 NAME

ceve - parse package metadata 

=head1 SYNOPSIS

=over 

=item B<ceve> [-h] [-v] [-c I<pkgspec>] [-r I<pkgspec>] [--depth=I<n>]I<> [-T I<format>] [-G I<graph type>] [-o I<filename>] I<input-spec> [I<input-spec>...]

=back

=head1 DESCRIPTION

Ceve is a generalized metadata parser. It reads package specifications,
extracts package metadata from them, performs some manipulations, and outputs
the package metadata in one of several formats. 

I<input-spec> is a url specifying the input format and the file to get the
input from. For a possible list of schemes, see the B<-t> parameter.

Some examples of URLs: 

=over 4

=item .

deb://Packages.gz (the Debian file packages.gz in the current directory)

=item .

cudf:///home/examples/cudf/test.cudf (the CUDF file /home/examples/cudf/test.cudf)

=back

=head1 OPTIONS

=head2 MISC OPTIONS

=over 8

=item B<-h, --help>

This option displays the help message.

=item B<-v, --verbose>

Be verbose. This option can be repeated for more verbosity. 

=item B<--version>

Show program's version and exit.

=item B<--progress>

Print progress bars.

=item B<--timers>

Print timing information.

=item B<--quiet>

Do no print any messages.

=back

=head2 INPUT OPTIONS

Dose3 accepts files compressed with L<gzip(1)> or L<bzip2(1)>, depending on
compile-time options.

=over 8

=item B<-t >I<input-spec>

Select the input type. Possible values are:

=item .

B<cudf> Cudf file format 

=item .

B<pef> PEF file format. The PEF format (Package Exchange Format) is a generic 822
file format used to encode package dependencies. B<deb>, B<opam>, B<debsrc> and 
B<edsp> are all based on the pef format

=item .

B<csw> OpenCSW Solaris packages binary format

=item .

B<opam> Opam Package universe in Opam/PEF format. This format is a 822 textual 
format encoding the opam universe.

=item .

B<deb> for Debian binary package files, also known as Packages files.

=item .

B<debsrc> for Debian source package files, also knows as Sources files.

=item .

B<edsp> apt-get External Dependency Solver Protocol

=item .

B<hdlist> RPM hdlists. Binary file format.

=item .

B<synthesis> urpmi synthesis hdlists. XML Based format 

=item B<--trim>

Consider only installable packages.

=item B<--latest> I<n>

Consider only the latest -I<n> most recent versions of each package,
older versions of packages are ignored.

=item B<-c, --cone=>I<vpkglist>

The B<match> of an atomic dependency (a package name p possibly together with a
version constraint c) is the set of all packages in the repository with name p,
and a version that satisfies the constraint c.  The dependency cone of a
package p is the set of all matches of all atomic dependencies of p, together
with their respective dependency cones. The package specification I<pkgspec> is
a list of packages (separated by a semicolon), where each package is specified
as follows: (I<name>,I<version>).

This option extracts the union of the dependency cones of all packages selected
by I<vpkglist>.

Example:
=over 12

=item -c 'golang-golang-x-tools (= 1:0.0~git20150716.0.87156cb+dfsg1-4),golang-golang-x-tools-dev'

=item B<-r, --rcone=>I<vpkglist> 

Using the same syntax as in B<-c>, this option use the reverse dependency
relation to make the transitive closure.

=item B<--depth >I<n> 

In combination with the B<-c> or B<-r> options, this specifies the
maximum depth for the transitive closure.

=item B<--request >I<installation-request>

Specifies an installation request of the form "B<install:> I<vpkglist>" or
"B<remove:> I<vpkglist>" or "B<upgrade:> I<vpkglist>" where I<vpkglist> is a
list of (real) packages possibly associated with a constraint. Ex.: bash (<
2.0), exim (= 3.1-debian1). This option can be repeated to specify install,
remove and upgrade actions.

Examples:

=over 12

=item --request "install: bash (< 2.0), exim (= 3.1-debian1)" --request "upgrade: apt-cudf"

=back

=back

=head2 OUTPUT OPTIONS

=over 8

=item B<-o, --outfile=>I<filename>

Instead of stdout, send output to the file I<filename>.

=item B<-d, --outdir=>I<directory>

Set the output directory (default current directory)

=item B<--dot>

Save the explanation graph (one for each package) in dot format.

=item B<-G >I<graph type> 

Specifies the graph type format to compute. This option must be used together
with the option B<-T >I<dot|gml|grml>. Default is B<syn>. Possible values are:

=item .

B<syn> for the syntactic graph where disjunctions nodes and conflicts are
explicitly added to the graph. 

=item .

B<pkg> for the package graph where all dependencies are threated uniformly and
conflicts are not added to the graph.

=item .

B<strdeps> the strong dependency graph. A package p strong depends on q iff p
cannot be installed if q is not installed.

=item .

B<strcnf>

=item .

B<conj> the conjunctive graph where only conjunctive dependencies are
considered.

=item .

B<dom>

=item B<-T >I<format> 

Specifies the output format to use. Default is B<cnf>. Possible values are:

=item .

B<cnf> output in CNF format.

=item .

B<dimacs> output in DIMACS format for CNF formulae.

=item .

B<cudf> pretty-printed output in an RFC 822-like format

=item .

B<deb> binary packages in deb822 format.

=item .

B<debsrc> source packages in deb822 format.

=item .

B<dot> a graph in Dot/GraphViz format.

=item .

B<gml> a graph in GML format.

=item .

B<grml> a graph in GraphML format.

=item .

B<table> plain text output of three integer values: the universe size, the
number of edges in the dependency graph, the number of conflicts in the
universe.

=back

=head2 DEBIAN SPECIFIC OPTIONS

Multi-arch annotations are handled by ceve. Packages whose's architecture is
neither the native architecture nor in the list of foreign architectures (see
below) are ignored.

=over 8

=item B<--deb-native-arch=>I<name>

Specify the native architecture. The default behavior is to deduce
the native architecture from the first package stanza in the input
that has an architecture different from all.

=item B<--deb-foreign-archs=>I<name> [,I<name>] ...

Specify a comma-separated list of foreign architectures. The default
is an empty list of foreign architectures.

=item B<--deb-ignore-essential>

By default all essential package are considered as a dependency of all packages
in the universe. This option allows the user to ignore essential packages.

=item B<--deb-host-arch=>I<name>

Native/cross compile host architecture, defaults to native architecture.

=item B<--deb-builds-from>

Add builds-from relationship of binary packages on source packages as
dependency. This allows one to create graphs for bootstrapping purposes.

=item B<-P, --deb-profiles=>I<name>[,I<name>...]

Comma separated list of activated build profiles.

=item B<--deb-drop-b-d-indep>

Drop Build-Depends-Indep dependencies from Debian source packages.

=item B<--deb-drop-b-d-arch>

Drop Build-Depends-Arch dependencies from Debian source packages.

=back

=head1 EXAMPLES

Find all the reverse binary dependencies of the package B<patchutils>:

	dose-ceve --deb-native-arch amd64 -r patchutils -T deb \
		deb:///var/lib/apt/lists/*_dists_sid_main_binary-amd64_Packages \
		| grep-dctrl -n -s Package '' | sort -u

Find all the source packages that (directly or indirectly) build depend on
B<patchutils>:

	dose-ceve -T debsrc --deb-native-arch=amd64 -r patchutils \
		debsrc:///var/lib/apt/lists/*_dists_sid_main_source_Sources \
		deb:///var/lib/apt/lists/*_dists_sid_main_binary-amd64_Packages \
		| grep-dctrl -n -s Package '' | sort -u

Find the source packages (-T debsrc) that have in a relation builds-from with
all the binary package in the reverse dependency cone of B<libssl-dev> (a
specific version constraint).

  dose-ceve --deb-builds-from --deb-native-arch=amd64 -T debsrc \
  -r 'libssl-dev (>= 0.9.8)' deb://Sid-amd64-Packages-050812.bz2 \
  debsrc://Sid-Sources-050812.bz2
