Lintian::Processable(3) | Debian Package Checker | Lintian::Processable(3) |
Lintian::Processable -- An (abstract) object that Lintian can process
use Lintian::Processable::Package; # Instantiate via Lintian::Processable::Package my $proc = Lintian::Processable::Package->new ('lintian_2.5.0_all.deb'); my $pkg_name = $proc->pkg_name; my $pkg_version = $proc->pkg_version; # etc.
Instances of this perl class are objects that Lintian can process (e.g. deb files). Multiple objects can then be combined into groups, which Lintian will process together.
If the PARAGRAPH has a field named "pkg_path", then that is used instead of creating the path from BASEPATH path concatenated with the TYPE specific field(s). Hench BASEPATH is optional if and only if, the paragraph has a field called "pkg_path".
The TYPE parameter determines the type of the processable and is required.
NB: Optional fields (e.g. "Source" for binaries) may be omitted in PARAGRAPH as usual. In this case, the respective values are computed from the required fields according to the Policy Manual.
Note: This may return the path to a symlink to the package.
Can also be used to set the group of this processable.
Note: This method must be implemented by sub-classes unless they provide an "info" field.
Note: By default this does nothing, but it may (and should) be overridden by sub-classes.
Returns $def if the field is not present or the implementation does not have (or want to expose) it. This method is not guaranteed to return the same value as "$proc->info->field ($field, $def)".
If $def is omitted is defaults to "undef".
Default implementation accesses them via the hashref stored in "extra-fields" if present. If the field is present, but not defined $def is returned instead.
NB: This is mostly an optimization used by Lintian::Lab to avoid (re-)reading the underlying package data.
Originally written by Niels Thykier <niels@thykier.net> for Lintian.
Lintian::ProcessableGroup
2019-05-26 | Lintian v2.15.0 |