285 lines
6.3 KiB
HTML
285 lines
6.3 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of Dpkg::Deps::Simple</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>Dpkg::Deps::Simple</H1>
|
|
Section: libdpkg-perl (3perl)<BR>Updated: 2020-03-23<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
Dpkg::Deps::Simple - represents a single dependency statement
|
|
<A NAME="lbAC"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
|
|
|
|
This object has several interesting properties:
|
|
<DL COMPACT>
|
|
<DT id="1">package<DD>
|
|
|
|
|
|
The package name (can be undef if the dependency has not been initialized
|
|
or if the simplification of the dependency lead to its removal).
|
|
<DT id="2">relation<DD>
|
|
|
|
|
|
The relational operator: ``='', ``<<'', ``<='', ``>='' or ``>>''. It can be
|
|
undefined if the dependency had no version restriction. In that case the
|
|
following field is also undefined.
|
|
<DT id="3">version<DD>
|
|
|
|
|
|
The version.
|
|
<DT id="4">arches<DD>
|
|
|
|
|
|
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.
|
|
<DT id="5">archqual<DD>
|
|
|
|
|
|
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''.
|
|
<DT id="6">restrictions<DD>
|
|
|
|
|
|
The restrictions formula for this dependency. It is undefined when there
|
|
is no restriction formula. Otherwise it is an array ref.
|
|
</DL>
|
|
<A NAME="lbAD"> </A>
|
|
<H2>METHODS</H2>
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="7">$dep = Dpkg::Deps::Simple->new([$dep[, %opts]]);<DD>
|
|
|
|
|
|
|
|
|
|
Creates a new object. Some options can be set through <TT>%opts:</TT>
|
|
<DL COMPACT><DT id="8"><DD>
|
|
<DL COMPACT>
|
|
<DT id="9">host_arch<DD>
|
|
|
|
|
|
Sets the host architecture.
|
|
<DT id="10">build_arch<DD>
|
|
|
|
|
|
Sets the build architecture.
|
|
<DT id="11">build_dep<DD>
|
|
|
|
|
|
Specifies whether the parser should consider it a build dependency.
|
|
Defaults to 0.
|
|
<DT id="12">tests_dep<DD>
|
|
|
|
|
|
Specifies whether the parser should consider it a tests dependency.
|
|
Defaults to 0.
|
|
</DL>
|
|
</DL>
|
|
|
|
<DL COMPACT><DT id="13"><DD>
|
|
</DL>
|
|
|
|
<DT id="14">$dep-><B>reset()</B><DD>
|
|
|
|
|
|
|
|
|
|
Clears any dependency information stored in <TT>$dep</TT> so that <TT>$dep</TT>-><B>is_empty()</B>
|
|
returns true.
|
|
<DT id="15">$dep->parse_string($dep_string)<DD>
|
|
|
|
|
|
|
|
|
|
Parses the dependency string and modifies internal properties to match the
|
|
parsed dependency.
|
|
<DT id="16">$dep->parse($fh, $desc)<DD>
|
|
|
|
|
|
|
|
|
|
Parse a dependency line from a filehandle.
|
|
<DT id="17">$dep->load($filename)<DD>
|
|
|
|
|
|
|
|
|
|
Parse a dependency line from <TT>$filename</TT>.
|
|
<DT id="18">$dep->output([$fh])<DD>
|
|
|
|
|
|
|
|
|
|
|
|
<DT id="19">"$dep"<DD>
|
|
|
|
|
|
|
|
|
|
|
|
Returns a string representing the dependency. If <TT>$fh</TT> is set, it prints
|
|
the string to the filehandle.
|
|
<DT id="20">$dep->save($filename)<DD>
|
|
|
|
|
|
|
|
|
|
Save the dependency into the given <TT>$filename</TT>.
|
|
<DT id="21">$dep->implies($other_dep)<DD>
|
|
|
|
|
|
|
|
|
|
Returns 1 when <TT>$dep</TT> implies <TT>$other_dep</TT>. Returns 0 when <TT>$dep</TT> implies
|
|
<FONT SIZE="-1">NOT</FONT>($other_dep). Returns undef when there is no implication. <TT>$dep</TT> and
|
|
<TT>$other_dep</TT> do not need to be of the same type.
|
|
<DT id="22">$dep-><B>get_deps()</B><DD>
|
|
|
|
|
|
|
|
|
|
Returns a list of sub-dependencies, which for this object it means it
|
|
returns itself.
|
|
<DT id="23">$dep-><B>sort()</B><DD>
|
|
|
|
|
|
|
|
|
|
This method is a no-op for this object.
|
|
<DT id="24">$dep->arch_is_concerned($arch)<DD>
|
|
|
|
|
|
|
|
|
|
Returns true if the dependency applies to the indicated architecture.
|
|
<DT id="25">$dep->reduce_arch($arch)<DD>
|
|
|
|
|
|
|
|
|
|
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.
|
|
<DT id="26">$dep-><B>has_arch_restriction()</B><DD>
|
|
|
|
|
|
|
|
|
|
Returns the package name if the dependency applies only to a subset of
|
|
architectures.
|
|
<DT id="27">$dep-><B>profile_is_concerned()</B><DD>
|
|
|
|
|
|
|
|
|
|
Returns true if the dependency applies to the indicated profile.
|
|
<DT id="28">$dep-><B>reduce_profiles()</B><DD>
|
|
|
|
|
|
|
|
|
|
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.
|
|
<DT id="29">$dep->get_evaluation($facts)<DD>
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
<P>
|
|
|
|
|
|
Returns 1 when it's true, 0 when it's false, undef when some information
|
|
is lacking to conclude.
|
|
<DT id="30">$dep->simplify_deps($facts, @assumed_deps)<DD>
|
|
|
|
|
|
|
|
|
|
Simplifies the dependency as much as possible given the list of facts (see
|
|
object Dpkg::Deps::KnownFacts) and a list of other dependencies that are
|
|
known to be true.
|
|
<DT id="31">$dep-><B>is_empty()</B><DD>
|
|
|
|
|
|
|
|
|
|
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.
|
|
<DT id="32">$dep->merge_union($other_dep)<DD>
|
|
|
|
|
|
|
|
|
|
Returns true if <TT>$dep</TT> could be modified to represent the union of both
|
|
dependencies. Otherwise returns false.
|
|
</DL>
|
|
<A NAME="lbAE"> </A>
|
|
<H2>CHANGES</H2>
|
|
|
|
|
|
|
|
<A NAME="lbAF"> </A>
|
|
<H3>Version 1.02 (dpkg 1.17.10)</H3>
|
|
|
|
|
|
|
|
New methods: Add <TT>$dep</TT>-><B>profile_is_concerned()</B> and <TT>$dep</TT>-><B>reduce_profiles()</B>.
|
|
<A NAME="lbAG"> </A>
|
|
<H3>Version 1.01 (dpkg 1.16.1)</H3>
|
|
|
|
|
|
|
|
New method: Add <TT>$dep</TT>-><B>reset()</B>.
|
|
<P>
|
|
|
|
New property: recognizes the arch qualifier ``any'' and stores it in the
|
|
``archqual'' property when present.
|
|
<A NAME="lbAH"> </A>
|
|
<H3>Version 1.00 (dpkg 1.15.6)</H3>
|
|
|
|
|
|
|
|
Mark the module as public.
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="33"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="34"><A HREF="#lbAC">DESCRIPTION</A><DD>
|
|
<DT id="35"><A HREF="#lbAD">METHODS</A><DD>
|
|
<DT id="36"><A HREF="#lbAE">CHANGES</A><DD>
|
|
<DL>
|
|
<DT id="37"><A HREF="#lbAF">Version 1.02 (dpkg 1.17.10)</A><DD>
|
|
<DT id="38"><A HREF="#lbAG">Version 1.01 (dpkg 1.16.1)</A><DD>
|
|
<DT id="39"><A HREF="#lbAH">Version 1.00 (dpkg 1.15.6)</A><DD>
|
|
</DL>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:39 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|