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

METHODS

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

CHANGES

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