.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35) .\" .\" 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 .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . 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 .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Lintian::Lab::Manifest 3" .TH Lintian::Lab::Manifest 3 "2019-04-04" "Lintian v2.12.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::Lab::Manifest \-\- Lintian Lab manifest .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Lintian::Lab::Manifest; \& \& my $plist = Lintian::Lab::Manifest\->new (\*(Aqbinary\*(Aq); \& # Read the file \& $plist\->read_list(\*(Aqinfo/binary\-packages\*(Aq); \& # fetch the entry for lintian (if any) \& my $entry = $plist\->get(\*(Aqlintian\*(Aq, \*(Aq2.5.2\*(Aq, \*(Aqall\*(Aq); \& if ( $entry && exits $entry\->{\*(Aqversion\*(Aq} ) { \& print "Lintian has version $entry\->{\*(Aqversion\*(Aq}\en"; \& } \& # delete all lintian entries \& $plist\->delete(\*(Aqlintian\*(Aq); \& # Write to file if changed \& if ($plist\->dirty) { \& $plist\->write_list(\*(Aqinfo/binary\-packages\*(Aq); \& } .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Instances of this class provide access to the packages list used by the lab as caches. .PP The data structure is basically a tree (using hashes). For binaries is looks (something) like: .PP .Vb 1 \& $self\->{\*(Aqstate\*(Aq}{$name}{$version}{$architecture} .Ve .PP The (order of the) fields used in the tree are listed in the @{\s-1BIN,SRC,CHG\s0}_QUERY lists below. The fields may (and generally do) differ between package types. .SH "CLASS METHODS" .IX Header "CLASS METHODS" .IP "new (TYPE[, \s-1GROUPING\s0])" 4 .IX Item "new (TYPE[, GROUPING])" Creates a new packages list for a certain type of packages. This type defines the format of the files. .Sp The known types are: * binary * changes * source * udeb * \s-1GROUP\s0 .Sp If \s-1TYPE\s0 is \s-1GROUP,\s0 then \s-1GROUPING\s0 should be omitted. .SH "INSTANCE METHODS" .IX Header "INSTANCE METHODS" .IP "dirty" 4 .IX Item "dirty" Returns a truth value if the manifest has changed since it was last written. .IP "type" 4 .IX Item "type" Returns the type of packages that this manifest has information about. (one of binary, udeb, source or changes) .IP "read_list (\s-1FILE\s0)" 4 .IX Item "read_list (FILE)" Reads a manifest from \s-1FILE.\s0 Any records already in the manifest will be discarded before reading the contents. .Sp On success, this will clear the \*(L"dirty\*(R" flag and on error it will croak. .IP "write_list (\s-1FILE\s0)" 4 .IX Item "write_list (FILE)" Writes the manifest to \s-1FILE.\s0 .Sp On success, this will clear the \*(L"dirty\*(R" flag and on error it will croak. .Sp On error, the contents of \s-1FILE\s0 are undefined. .IP "visit_all (VISITOR[, \s-1KEY1, ..., KEYN\s0])" 4 .IX Item "visit_all (VISITOR[, KEY1, ..., KEYN])" Visits entries and passes them to \s-1VISITOR.\s0 If any keys are passed they are used to reduce the search. See get for a list of (common) keys. .Sp The \s-1VISITOR\s0 is called as: .Sp .Vb 1 \& VISITOR\->(ENTRY, KEYS) .Ve .Sp where \s-1ENTRY\s0 is the entry and \s-1KEYS\s0 are the keys to be used to look up this entry via get method. So for the lintian 2.5.2 binary the keys would be something like: ('lintian', '2.5.2', 'all') .IP "get (\s-1KEYS...\s0)" 4 .IX Item "get (KEYS...)" Fetches the entry for \s-1KEYS\s0 (if any). Returns \f(CW\*(C`undef\*(C'\fR if the entry is not known. If \s-1KEYS\s0 is exactly one item, it is assumed to be a Lintian::Processable and the correct keys are extracted from it. .Sp Otherwise, the keys are (in general and in order): .RS 4 .IP "package/source" 4 .IX Item "package/source" .PD 0 .IP "version" 4 .IX Item "version" .IP "architecture" 4 .IX Item "architecture" .PD except for source packages .RE .RS 4 .RE .IP "set (\s-1ENTRY\s0)" 4 .IX Item "set (ENTRY)" Inserts \s-1ENTRY\s0 into the manifest. This may replace an existing entry. .Sp Note: The interesting fields from \s-1ENTRY\s0 are copied, so later changes to \s-1ENTRY\s0 will not affect the data in the manifest. .IP "set_transient_marker (\s-1TRANSIENT, KEYS...\s0)" 4 .IX Item "set_transient_marker (TRANSIENT, KEYS...)" Set or clear transient flag. Transient entries are not written to the disk (i.e. They will not appear in the file created/written by \&\*(L"write_list (\s-1FILE\s0)\*(R"). \s-1KEYS\s0 is passed as is passed to \&\*(L"get (\s-1KEYS...\s0)\*(R". .Sp By default all entries are persistent. .IP "delete (\s-1KEYS...\s0)" 4 .IX Item "delete (KEYS...)" Removes the entry/entries found by \s-1KEYS\s0 (if any). \s-1KEYS\s0 must contain at least one item \- if the list of keys cannot uniquely identify a single element, all \*(L"matching\*(R" elements will be removed. Examples: .Sp .Vb 2 \& # Delete the gcc\-4.6 entry at version 4.6.1\-4 that is also architecture i386 \& $manifest\->delete (\*(Aqgcc\-4.6\*(Aq, \*(Aq4.6.1\-4\*(Aq, \*(Aqi386\*(Aq); \& \& # Delete all gcc\-4.6 entries at version 4.6.1\-4 regardless of their \& # architecture \& $manifest\->delete (\*(Aqgcc\-4.6\*(Aq, \*(Aq4.6.1\-4\*(Aq); \& \& # Delete all gcc\-4.6 entries regardless of version and architecture \& $manifest\->delete (\*(Aqgcc\-4.6\*(Aq) .Ve .Sp If \s-1KEYS\s0 is exactly one item, it is assumed to be a Lintian::Processable. If so, the proper keys will be extracted from that processable and (if present) that one element will be removed. .Sp This will mark the list as dirty if an element was removed. If it returns a truth value, an element was removed \- otherwise it will return 0. .Sp See \*(L"get (\s-1KEYS...\s0)\*(R" for the key names. .IP "diff (\s-1MANIFEST\s0)" 4 .IX Item "diff (MANIFEST)" Returns a diff between this manifest and \&\s-1MANIFEST.\s0 .Sp This instance is considered the \*(L"original\*(R" and \s-1MANIFEST\s0 is \*(L"new\*(R" version of the manifest. (See the olist and nlist methods of Lintian::Lab::ManifestDiff for more information. .SH "AUTHOR" .IX Header "AUTHOR" Originally written by Niels Thykier for Lintian. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBlintian\fR\|(1)