Lintian::Architecture(3) | Debian Package Checker | Lintian::Architecture(3) |
Lintian::Architecture -- Lintian API for handling architectures and wildcards
use Lintian::Architecture qw(:all); print "arch\n" if is_arch ('i386'); print "wildcard\n" if is_arch_wildcard ('any'); print "either arch or wc\n" if is_arch_or_wildcard ('linux-any'); foreach my $arch (expand_arch_wildcard ('any')) { print "any expands to $arch\n"; }
Lintian API for checking and expanding architectures and architecture wildcards. The functions are backed by a data file, so it may be out of date (use private/refresh-archs to update it).
Generally all architecture names are in the format "$os-$arch" and wildcards are "$os-any" or "any-$cpu", though there are exceptions:
Source: Policy X5.6.8 (v3.9.3)
Source: Policy X5.6.8 (v3.9.3)
Source: Policy X11.1 (v3.9.3)
Note that the architecture and cpu name are not always identical (example architecture "armhf" has cpu name "arm").
The following methods are exportable:
Note: 'any' is considered a wildcard and not an architecture.
Shorthand for:
is_arch ($arch) || is_arch_wildcard ($arch)
Note: This list is based on the architectures in Lintian's data file. However, many of these are not supported or used in Debian or any of its derivatives.
The returned values matches the list generated by dpkg-architecture -L, so the returned list may use (e.g.) "amd64" for "linux-amd64".
This is generally faster than
grep { $_ eq $arch } expand_arch_wildcard ($wc)
It also properly handles cases like "linux-amd64" and "amd64" being aliases.
2019-05-26 | Lintian v2.15.0 |