table of contents
Lintian::Processable::Source::Fields(3) | Debian Package Checker | Lintian::Processable::Source::Fields(3) |
NAME¶
Lintian::Processable::Source::Fields - Lintian interface to source package data collection
SYNOPSIS¶
my ($name, $type, $dir) = ('foobar', 'source', '/path/to/lab-entry'); my $collect = Lintian::Processable::Source::Fields->new($name); if ($collect->native) { print "Package is native\n"; }
DESCRIPTION¶
Lintian::Processable::Source::Fields provides an interface to package data for source packages. It implements data collection methods specific to source 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 source 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.
INSTANCE METHODS¶
- binaries
- Returns a list of the binary and udeb packages listed in the
debian/control. Package names appear the same order in the returned
list as they do in the control file.
Note: Package names that are not valid are silently ignored.
- binary_package_type (BINARY)
- Returns package type based on value of the Package-Type (or if absent,
X-Package-Type) field. If the field is omitted, the default value
"deb" is used.
If the BINARY is not a binary listed in the source packages debian/control file, this method return "undef".
- source_field([FIELD[, DEFAULT]])
- Returns the content of the field FIELD from source package paragraph of
the debian/control file, or DEFAULT (defaulting to
"undef") if the field is not present.
Only the literal value of the field is returned.
If FIELD is not given, return a hashref mapping field names to their values (in this case DEFAULT is ignored). This hashref should not be modified.
NB: If a field from the "dsc" file itself is desired, please use field instead.
- binary_field (PACKAGE[, FIELD[, DEFAULT]])
- Returns the content of the field FIELD for the binary package PACKAGE in
the debian/control file, or DEFAULT (defaulting to
"undef") if the field is not present.
Inheritance of field values from the source section of the control file is
not implemented. Only the literal value of the field is returned.
If FIELD is not given, return a hashref mapping field names to their values (in this case, DEFAULT is ignored). This hashref should not be modified.
If PACKAGE is not a binary built from this source, this returns DEFAULT.
- load_debian_control
- binaries_data =item binary_names
- binary_fields =item binary_legend
- source_fields =item source_legend
AUTHOR¶
Originally written by Russ Allbery <rra@debian.org> for Lintian. Amended by Felix Lechner <felix.lechner@lease-up.com> for Lintian.
SEE ALSO¶
2020-07-07 | Lintian v2.83.0 |