Lintian::Collect::Binary - Lintian interface to binary package data collection
my ($name, $type, $dir) = ('foobar', 'binary', '/path/to/lab-entry'); my $collect = Lintian::Collect::Binary->new($name);
Lintian::Collect::Binary provides an interface to package data for binary packages. It implements data collection methods specific to binary packages.
This module is in its infancy. Most of Lintian still reads all data from files in the laboratory whenever that data is needed and generates that data via collect scripts. The goal is to eventually access all data about binary packages via this module so that the module can cache data where appropriate and possibly retire collect scripts in favor of caching that data in memory.
Native heuristics are only available in source packages.
In addition to the instance methods listed below, all instance methods documented in the Lintian::Collect and the Lintian::Info::Package modules are also available.
Returns a index object representing installed files from a binary package.
An index object for installed binary files.
Returns a path object to FILE in the package. FILE must be relative to the root of the unpacked package and must be without leading slash (or "./"). If FILE is not in the package, it returns undef
. If FILE is supposed to be a directory, it must be given with a trailing slash. Example:
my $file = $info->index ("usr/bin/lintian"); my $dir = $info->index ("usr/bin/");
To get a list of entries in the package, see "sorted_index". To actually access the underlying file (e.g. the contents), use "unpacked ([FILE])".
Note that the "root directory" (denoted by the empty string) will always be present, even if the underlying tarball omits it.
Needs-Info requirements for using index: unpacked
Returns a sorted array of file names listed in the package. The names will not have a leading slash (or "./") and can be passed to "unpacked ([FILE])" or "index (FILE)" as is.
The array will not contain the entry for the "root" of the package.
NB: For source packages, please see the "index"-caveat.
Needs-Info requirements for using sorted_index: Same as index
Resolve PATH (relative to the root of the package) and return the entry denoting the resolved path.
The resolution is done using resolve_path.
NB: For source packages, please see the "index"-caveat.
Needs-Info requirements for using index_resolved_path: Same as index
Returns an open handle, which will read the data from coll/strings for FILE. If coll/strings did not collect any strings about FILE, this returns an open read handle with no content.
Caller is responsible for closing the handle either way.
Needs-Info requirements for using strings: strings
Returns a Lintian::Relation object for the specified FIELD, which should be one of the possible relationship fields of a Debian package or one of the following special values:
The concatenation of Pre-Depends, Depends, Recommends, and Suggests.
The concatenation of Pre-Depends and Depends.
The concatenation of Recommends and Suggests.
If FIELD isn't present in the package, the returned Lintian::Relation object will be empty (always satisfied and implies nothing).
Needs-Info requirements for using relation: Same as field
Returns a truth value if the package is the given TYPE of special package. TYPE can be one of "transitional", "debug" or "any-meta". If omitted it defaults to "any-meta". The semantics for these values are:
The package is (probably) a transitional package (e.g. it is probably empty, just depend on stuff will eventually disappear.)
Guessed from package description.
This package is (probably) some kind of meta or task package. A meta package is usually empty and just depend on stuff. It will also return a truth value for "tasks" (i.e. tasksel "tasks").
A transitional package will also match this.
Guessed from package description, section or package name.
The package is (probably) a package containing debug symbols.
Guessed from the package name.
The package is (probably) a package generated automatically (e.g. a dbgsym package)
Guessed from the "Auto-Built-Package" field.
Needs-Info requirements for using is_pkg_class: Same as field
Returns a truth value if the package appears to be non-free (based on the section field; "non-free/*" and "restricted/*")
Needs-Info requirements for using is_non_free: "field ([FIELD[, DEFAULT]])"
Originally written by Frank Lichtenheld <djpig@debian.org> for Lintian.
lintian(1), Lintian::Collect, Lintian::Relation