my ($name, $type, $dir) = ('foobar', 'source', '/path/to/lab-entry'); my $collect = Lintian::Collect->new ($name, $type, $dir); if ($collect->native) { print "Package is native\n"; }
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.
Needs-Info requirements for using changelog: Same as index_resolved_path
Needs-Info requirements for using diffstat: diffstat
If the source format is 1.0 and the version number is absent, this will return false (as native packages are a lot rarer than non-native ones).
Note if the source format is missing, it is assumed to be a 1.0 package.
Needs-Info requirements for using native: Same as field
Needs-Info requirements for using files: ``field ([FIELD[, DEFAULT]])'' in Lintian::Collect
Needs-Info requirements for using repacked: Same as field
Note: Package names that are not valid are silently ignored.
Needs-Info requirements for using binaries: Same as binary_package_type
If the BINARY is not a binary listed in the source packages debian/control file, this method return "undef".
Needs-Info requirements for using binary_package_type: Same as binary_field
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.
Needs-Info requirements for using source_field: Same as index_resolved_path
For native packages ``index'' and ``orig_index'' are generally identical.
NB: If sorted_index includes a debian packaging, it is was contained in upstream part of the source package (or the package is native).
Needs-Info requirements for using orig_index: src-orig-index
For native packages sorted_index and ``sorted_orig_index'' are generally identical.
NB: If sorted_orig_index includes a debian packaging, it is was contained in upstream part of the source package (or the package is native).
Needs-Info requirements for using sorted_orig_index: Same as orig_index
The resolution is done using resolve_path.
NB: If orig_index_resolved_path includes a debian packaging, it is was contained in upstream part of the source package (or the package is native).
Needs-Info requirements for using orig_index_resolved_path: Same as orig_index
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.
Needs-Info requirements for using binary_field: Same as index_resolved_path
if (exists $info->java_info->{$file}{'manifest'}) { my $cp = $info->java_info->{$file}{'manifest'}{'Class-Path'}; # ... }
NB: Not all jar files have a manifest. For those without, this will value will not be available. Use exists (rather than defined) to check for it.
Needs-Info requirements for using java_info: java-info
If FIELD isn't present in the package, the returned Lintian::Relation object will be empty (always satisfied and implies nothing).
Any substvars in debian/control will be represented in the returned relation as packages named after the substvar.
Needs-Info requirements for using binary_relation: Same as binary_field
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
Needs-Info requirements for using relation_noarch: Same as relation
Returns the path to FILE in the debian dir of the extracted source package. FILE must be relative to the root of the debian dir and should be without leading slash (and without ``./''). If FILE is not in the debian dir, it returns the path to a non-existent file entry.
It is not permitted for FILE to be "undef". If the ``root'' dir is desired either invoke this method without any arguments at all or use the empty string.
The caveats of unpacked also apply to this method.
Needs-Info requirements for using debfiles: debfiles
The index of a source package is not very well defined for non-native source packages. This method gives the index of the ``unpacked'' package (with 3.0 (quilt), this implies patches have been applied).
If you want the index of what is listed in the upstream orig tarballs, then there is ``orig_index''.
For native packages, the two indices are generally the same as they only have one tarball and their debian packaging is included in that tarball.
IMPLEMENTATION DETAIL/CAVEAT: Lintian currently (2.5.11) generates this by running ``find(1)'' after unpacking the source package. This has three consequences.
First it means that (original) owner/group data is lost; Lintian inserts ``root/root'' here. This is usually not a problem as owner/group information for source packages do not really follow any standards.
Secondly, permissions are modified by A) umask and B) laboratory set{g,u}id bits (the laboratory on lintian.d.o has setgid). This is *not* corrected/altered. Note Lintian (usually) breaks if any of the ``user'' bits are set in the umask, so that part of the permission bit should be reliable.
Again, this shouldn't be a problem as permissions in source packages are usually not important. Though if accuracy is needed here, ``orig_index'' may used instead (assuming it has the file in question).
Third, hardlinking information is lost and no attempt has been made to restore it.
Needs-Info requirements for using index: unpacked
Needs-Info requirements for using is_non_free: ``source_field ([FIELD[, DEFAULT]])''