.\" -*- 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 "Dpkg::Deps::Simple 3perl" .TH Dpkg::Deps::Simple 3perl 2024-03-10 1.22.6 libdpkg-perl .\" 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 Dpkg::Deps::Simple \- represents a single dependency statement .SH DESCRIPTION .IX Header "DESCRIPTION" This class represents a single dependency statement. It has several interesting properties: .IP package 4 .IX Item "package" The package name (can be undef if the dependency has not been initialized or if the simplification of the dependency lead to its removal). .IP relation 4 .IX Item "relation" The relational operator: "=", "<<", "<=", ">=" or ">>". It can be undefined if the dependency had no version restriction. In that case the following field is also undefined. .IP version 4 .IX Item "version" The version. .IP arches 4 .IX Item "arches" The list of architectures where this dependency is applicable. It is undefined when there's no restriction, otherwise it is an array ref. It can contain an exclusion list, in that case each architecture is prefixed with an exclamation mark. .IP archqual 4 .IX Item "archqual" The arch qualifier of the dependency (can be undef if there is none). In the dependency "python:any (>= 2.6)", the arch qualifier is "any". .IP restrictions 4 .IX Item "restrictions" The restrictions formula for this dependency. It is undefined when there is no restriction formula. Otherwise it is an array ref. .SH METHODS .IX Header "METHODS" .ie n .IP "$dep = Dpkg::Deps::Simple\->new([$dep[, %opts]]);" 4 .el .IP "\f(CW$dep\fR = Dpkg::Deps::Simple\->new([$dep[, \f(CW%opts\fR]]);" 4 .IX Item "$dep = Dpkg::Deps::Simple->new([$dep[, %opts]]);" Creates a new object. Some options can be set through \f(CW%opts:\fR .RS 4 .IP host_arch 4 .IX Item "host_arch" Sets the host architecture. .IP build_arch 4 .IX Item "build_arch" Sets the build architecture. .IP build_dep 4 .IX Item "build_dep" Specifies whether the parser should consider it a build dependency. Defaults to 0. .IP tests_dep 4 .IX Item "tests_dep" Specifies whether the parser should consider it a tests dependency. Defaults to 0. .Sp This option implicitly (and forcibly) enables \f(CW\*(C`build_dep\*(C'\fR because test dependencies are based on build dependencies (since dpkg 1.22.1). .RE .RS 4 .RE .ie n .IP $dep\->\fBreset()\fR 4 .el .IP \f(CW$dep\fR\->\fBreset()\fR 4 .IX Item "$dep->reset()" Clears any dependency information stored in \f(CW$dep\fR so that \f(CW$dep\fR\->\fBis_empty()\fR returns true. .ie n .IP $dep\->parse_string($dep_string) 4 .el .IP \f(CW$dep\fR\->parse_string($dep_string) 4 .IX Item "$dep->parse_string($dep_string)" Parses the dependency string and modifies internal properties to match the parsed dependency. .ie n .IP "$dep\->parse($fh, $desc)" 4 .el .IP "\f(CW$dep\fR\->parse($fh, \f(CW$desc\fR)" 4 .IX Item "$dep->parse($fh, $desc)" Parse a dependency line from a filehandle. .ie n .IP $dep\->load($filename) 4 .el .IP \f(CW$dep\fR\->load($filename) 4 .IX Item "$dep->load($filename)" Parse a dependency line from \f(CW$filename\fR. .ie n .IP $dep\->output([$fh]) 4 .el .IP \f(CW$dep\fR\->output([$fh]) 4 .IX Item "$dep->output([$fh])" .PD 0 .IP """$dep""" 4 .IX Item """$dep""" .PD Returns a string representing the dependency. If \f(CW$fh\fR is set, it prints the string to the filehandle. .ie n .IP $dep\->save($filename) 4 .el .IP \f(CW$dep\fR\->save($filename) 4 .IX Item "$dep->save($filename)" Save the dependency into the given \f(CW$filename\fR. .ie n .IP $dep\->implies($other_dep) 4 .el .IP \f(CW$dep\fR\->implies($other_dep) 4 .IX Item "$dep->implies($other_dep)" Returns 1 when \f(CW$dep\fR implies \f(CW$other_dep\fR. Returns 0 when \f(CW$dep\fR implies NOT($other_dep). Returns undef when there is no implication. \f(CW$dep\fR and \&\f(CW$other_dep\fR do not need to be of the same type. .ie n .IP $dep\->\fBget_deps()\fR 4 .el .IP \f(CW$dep\fR\->\fBget_deps()\fR 4 .IX Item "$dep->get_deps()" Returns a list of sub-dependencies, which for this object it means it returns itself. .ie n .IP $dep\->\fBsort()\fR 4 .el .IP \f(CW$dep\fR\->\fBsort()\fR 4 .IX Item "$dep->sort()" This method is a no-op for this object. .ie n .IP $dep\->arch_is_concerned($arch) 4 .el .IP \f(CW$dep\fR\->arch_is_concerned($arch) 4 .IX Item "$dep->arch_is_concerned($arch)" Returns true if the dependency applies to the indicated architecture. .ie n .IP $dep\->reduce_arch($arch) 4 .el .IP \f(CW$dep\fR\->reduce_arch($arch) 4 .IX Item "$dep->reduce_arch($arch)" Simplifies the dependency to contain only information relevant to the given architecture. This object can be left empty after this operation. This trims off the architecture restriction list of these objects. .ie n .IP $dep\->\fBhas_arch_restriction()\fR 4 .el .IP \f(CW$dep\fR\->\fBhas_arch_restriction()\fR 4 .IX Item "$dep->has_arch_restriction()" Returns the package name if the dependency applies only to a subset of architectures. .ie n .IP $dep\->\fBprofile_is_concerned()\fR 4 .el .IP \f(CW$dep\fR\->\fBprofile_is_concerned()\fR 4 .IX Item "$dep->profile_is_concerned()" Returns true if the dependency applies to the indicated profile. .ie n .IP $dep\->\fBreduce_profiles()\fR 4 .el .IP \f(CW$dep\fR\->\fBreduce_profiles()\fR 4 .IX Item "$dep->reduce_profiles()" Simplifies the dependency to contain only information relevant to the given profile. This object can be left empty after this operation. This trims off the profile restriction list of this object. .ie n .IP $dep\->get_evaluation($facts) 4 .el .IP \f(CW$dep\fR\->get_evaluation($facts) 4 .IX Item "$dep->get_evaluation($facts)" Evaluates the dependency given a list of installed packages and a list of virtual packages provided. These lists are part of the Dpkg::Deps::KnownFacts object given as parameters. .Sp Returns 1 when it's true, 0 when it's false, undef when some information is lacking to conclude. .ie n .IP "$dep\->simplify_deps($facts, @assumed_deps)" 4 .el .IP "\f(CW$dep\fR\->simplify_deps($facts, \f(CW@assumed_deps\fR)" 4 .IX Item "$dep->simplify_deps($facts, @assumed_deps)" Simplifies the dependency as much as possible given the list of facts (see class Dpkg::Deps::KnownFacts) and a list of other dependencies that are known to be true. .ie n .IP $dep\->\fBis_empty()\fR 4 .el .IP \f(CW$dep\fR\->\fBis_empty()\fR 4 .IX Item "$dep->is_empty()" Returns true if the dependency is empty and doesn't contain any useful information. This is true when the object has not yet been initialized. .ie n .IP $dep\->merge_union($other_dep) 4 .el .IP \f(CW$dep\fR\->merge_union($other_dep) 4 .IX Item "$dep->merge_union($other_dep)" Returns true if \f(CW$dep\fR could be modified to represent the union of both dependencies. Otherwise returns false. .SH CHANGES .IX Header "CHANGES" .SS "Version 1.02 (dpkg 1.17.10)" .IX Subsection "Version 1.02 (dpkg 1.17.10)" New methods: Add \f(CW$dep\fR\->\fBprofile_is_concerned()\fR and \f(CW$dep\fR\->\fBreduce_profiles()\fR. .SS "Version 1.01 (dpkg 1.16.1)" .IX Subsection "Version 1.01 (dpkg 1.16.1)" New method: Add \f(CW$dep\fR\->\fBreset()\fR. .PP New property: recognizes the arch qualifier "any" and stores it in the "archqual" property when present. .SS "Version 1.00 (dpkg 1.15.6)" .IX Subsection "Version 1.00 (dpkg 1.15.6)" Mark the module as public.