1Dpkg::Deps::Simple(3perl)        libdpkg-perl        Dpkg::Deps::Simple(3perl)
2
3
4

NAME

6       Dpkg::Deps::Simple - represents a single dependency statement
7

DESCRIPTION

9       This class represents a single dependency statement.  It has several
10       interesting properties:
11
12       package
13           The package name (can be undef if the dependency has not been
14           initialized or if the simplification of the dependency lead to its
15           removal).
16
17       relation
18           The relational operator: "=", "<<", "<=", ">=" or ">>". It can be
19           undefined if the dependency had no version restriction. In that
20           case the following field is also undefined.
21
22       version
23           The version.
24
25       arches
26           The list of architectures where this dependency is applicable. It
27           is undefined when there's no restriction, otherwise it is an array
28           ref. It can contain an exclusion list, in that case each
29           architecture is prefixed with an exclamation mark.
30
31       archqual
32           The arch qualifier of the dependency (can be undef if there is
33           none).  In the dependency "python:any (>= 2.6)", the arch qualifier
34           is "any".
35
36       restrictions
37           The restrictions formula for this dependency. It is undefined when
38           there is no restriction formula. Otherwise it is an array ref.
39

METHODS

41       $dep = Dpkg::Deps::Simple->new([$dep[, %opts]]);
42           Creates a new object. Some options can be set through %opts:
43
44           host_arch
45               Sets the host architecture.
46
47           build_arch
48               Sets the build architecture.
49
50           build_dep
51               Specifies whether the parser should consider it a build
52               dependency.  Defaults to 0.
53
54           tests_dep
55               Specifies whether the parser should consider it a tests
56               dependency.  Defaults to 0.
57
58       $dep->reset()
59           Clears any dependency information stored in $dep so that
60           $dep->is_empty() returns true.
61
62       $dep->parse_string($dep_string)
63           Parses the dependency string and modifies internal properties to
64           match the parsed dependency.
65
66       $dep->parse($fh, $desc)
67           Parse a dependency line from a filehandle.
68
69       $dep->load($filename)
70           Parse a dependency line from $filename.
71
72       $dep->output([$fh])
73       "$dep"
74           Returns a string representing the dependency. If $fh is set, it
75           prints the string to the filehandle.
76
77       $dep->save($filename)
78           Save the dependency into the given $filename.
79
80       $dep->implies($other_dep)
81           Returns 1 when $dep implies $other_dep. Returns 0 when $dep implies
82           NOT($other_dep). Returns undef when there is no implication. $dep
83           and $other_dep do not need to be of the same type.
84
85       $dep->get_deps()
86           Returns a list of sub-dependencies, which for this object it means
87           it returns itself.
88
89       $dep->sort()
90           This method is a no-op for this object.
91
92       $dep->arch_is_concerned($arch)
93           Returns true if the dependency applies to the indicated
94           architecture.
95
96       $dep->reduce_arch($arch)
97           Simplifies the dependency to contain only information relevant to
98           the given architecture. This object can be left empty after this
99           operation. This trims off the architecture restriction list of
100           these objects.
101
102       $dep->has_arch_restriction()
103           Returns the package name if the dependency applies only to a subset
104           of architectures.
105
106       $dep->profile_is_concerned()
107           Returns true if the dependency applies to the indicated profile.
108
109       $dep->reduce_profiles()
110           Simplifies the dependency to contain only information relevant to
111           the given profile. This object can be left empty after this
112           operation. This trims off the profile restriction list of this
113           object.
114
115       $dep->get_evaluation($facts)
116           Evaluates the dependency given a list of installed packages and a
117           list of virtual packages provided. These lists are part of the
118           Dpkg::Deps::KnownFacts object given as parameters.
119
120           Returns 1 when it's true, 0 when it's false, undef when some
121           information is lacking to conclude.
122
123       $dep->simplify_deps($facts, @assumed_deps)
124           Simplifies the dependency as much as possible given the list of
125           facts (see class Dpkg::Deps::KnownFacts) and a list of other
126           dependencies that are known to be true.
127
128       $dep->is_empty()
129           Returns true if the dependency is empty and doesn't contain any
130           useful information. This is true when the object has not yet been
131           initialized.
132
133       $dep->merge_union($other_dep)
134           Returns true if $dep could be modified to represent the union of
135           both dependencies. Otherwise returns false.
136

CHANGES

138   Version 1.02 (dpkg 1.17.10)
139       New methods: Add $dep->profile_is_concerned() and
140       $dep->reduce_profiles().
141
142   Version 1.01 (dpkg 1.16.1)
143       New method: Add $dep->reset().
144
145       New property: recognizes the arch qualifier "any" and stores it in the
146       "archqual" property when present.
147
148   Version 1.00 (dpkg 1.15.6)
149       Mark the module as public.
150
151
152
1531.20.9                            2021-07-21         Dpkg::Deps::Simple(3perl)
Impressum