.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Lintian::Data::Architectures 3" .TH Lintian::Data::Architectures 3 2024-02-05 "Lintian v2.117.0" "Debian Package Checker" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Lintian::Data::Architectures \-\- Lintian API for handling architectures and wildcards .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& use Lintian::Data::Architectures; .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" 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). .PP Generally all architecture names are in the format "$os\-$architecture" and wildcards are "$os\-any" or "any\-$cpu", though there are exceptions: .PP Note that the architecture and cpu name are not always identical (example architecture "armhf" has cpu name "arm"). .SH "INSTANCE METHODS" .IX Header "INSTANCE METHODS" .IP title 4 .IX Item "title" .PD 0 .IP location 4 .IX Item "location" .IP host_variables 4 .IX Item "host_variables" .ie n .IP """wildcards""" 4 .el .IP \f(CWwildcards\fR 4 .IX Item "wildcards" .ie n .IP """names""" 4 .el .IP \f(CWnames\fR 4 .IX Item "names" .IP "is_wildcard ($wildcard)" 4 .IX Item "is_wildcard ($wildcard)" .PD Returns a truth value if \f(CW$wildcard\fR is a known architecture wildcard. .Sp Note: 'any' is considered a wildcard and not an architecture. .IP "is_release_architecture ($architecture)" 4 .IX Item "is_release_architecture ($architecture)" Returns a truth value if \f(CW$architecture\fR is (an alias of) a Debian machine architecture. It returns a false value for architecture wildcards (including "any") and unknown architectures. .IP "expand_wildcard ($wildcard)" 4 .IX Item "expand_wildcard ($wildcard)" Returns a list of architectures that this wildcard expands to. No order is guaranteed (even between calls). Returned values must not be modified. .Sp 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. .Sp The returned values matches the list generated by dpkg-architecture \-L, so the returned list may use (e.g.) "amd64" for "linux\-amd64". .ie n .IP "wildcard_includes ($wildcard, $architecture)" 4 .el .IP "wildcard_includes ($wildcard, \f(CW$architecture\fR)" 4 .IX Item "wildcard_includes ($wildcard, $architecture)" Returns a truth value if \f(CW$architecture\fR is included in the list of architectures that \f(CW$wildcard\fR expands to. .Sp This is generally faster than .Sp .Vb 1 \& grep { $_ eq $architecture } expand_arch_wildcard ($wildcard) .Ve .Sp It also properly handles cases like "linux\-amd64" and "amd64" being aliases. .IP valid_restriction 4 .IX Item "valid_restriction" .PD 0 .IP restriction_matches 4 .IX Item "restriction_matches" .IP load 4 .IX Item "load" .IP refresh 4 .IX Item "refresh"