Dpkg::Deps::Simple(3perl)
π
Dpkg::Deps::Simple(3perl) β libdpkg-perl
okay so bestie, this is the manual page for Dpkg::Deps::Simple, and it's giving tiny-but-mighty dependency-object energy. no cap, we're keeping every property, every method, every version note, and every little caveat. periodt. πβ¨
πΈ NAME
Dpkg::Deps::Simple β represents a single dependency statement. π
β¨ DESCRIPTION
This class represents a single dependency statement. It has several interesting properties, and yes, we are listing every single one. π«Ά
packageβ The package name. It can beundefif the dependency has not been initialized or if the simplification of the dependency lead to its removal.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.versionβ The version.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.archqualβ The arch qualifier of the dependency (can beundefif there is none). In the dependencypython:any (>= 2.6), the arch qualifier isany.restrictionsβ The restrictions formula for this dependency. It is undefined when there is no restriction formula. Otherwise it is an array ref.
π οΈ METHODS
okay, methods time. this is where the icon behavior lives, so let's get into it. π
$dep = Dpkg::Deps::Simple->new([$dep[, %opts]]);β Creates a new object. β¨
Options:
host_archβ Sets the host architecture.build_archβ Sets the build architecture.build_depβ Specifies whether the parser should consider it a build dependency. Defaults to0.tests_depβ Specifies whether the parser should consider it a tests dependency. Defaults to0.
This option implicitly (and forcibly) enables build_dep because test dependencies are based on build dependencies (since dpkg 1.22.1).
$dep->reset()β Clears any dependency information stored in$depso that$dep->is_empty()returns true.$dep->parse_string($dep_string)β Parses the dependency string and modifies internal properties to match the parsed dependency.$dep->parse($fh, $desc)β Parse a dependency line from a filehandle.$dep->load($filename)β Parse a dependency line from$filename.$string = "$dep"/$string = $dep->output([$fh])β Returns a string representing the dependency. If$fhis set, it prints the string to the filehandle.$dep->save($filename)β Save the dependency into the given$filename.$tribool = $dep->implies($other_dep)β Returns1when$depimplies$other_dep. Returns0when$depimpliesNOT($other_dep). Returnsundefwhen there is no implication.$depand$other_depdo not need to be of the same type.@dep_list = $dep->get_deps()β Returns a list of sub-dependencies, which for this object it means it returns itself.$dep->sort()β This method is a no-op for this object.$bool = $dep->arch_is_concerned($arch)β Returns true if the dependency applies to the indicated architecture.$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.$pkgname = $dep->has_arch_restriction()β Returns the package name if the dependency applies only to a subset of architectures.$bool = $dep->profile_is_concerned()β Returns true if the dependency applies to the indicated profile.$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.$tribool = $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 theDpkg::Deps::KnownFactsobject given as parameters.
Returns 1 when it's true, 0 when it's false, undef when some information is lacking to conclude.
$dep->simplify_deps($facts, @assumed_deps)β Simplifies the dependency as much as possible given the list of facts (see classDpkg::Deps::KnownFacts) and a list of other dependencies that are known to be true.$bool = $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.$bool = $dep->merge_union($other_dep)β Returns true if$depcould be modified to represent the union of both dependencies. Otherwise returnsfalse.
π CHANGES
π Version 1.02 (dpkg 1.17.10)
- New methods: Add
$dep->profile_is_concerned()and$dep->reduce_profiles(). π
π¦ Version 1.01 (dpkg 1.16.1)
- New method: Add
$dep->reset(). - New property: recognizes the arch qualifier
"any"and stores it in the"archqual"property when present.
π Version 1.00 (dpkg 1.15.6)
- Mark the module as public. β¨
and that's the whole manual page, bestie. the footer energy is source/version 1.23.11-dirty and date 2026-09-09βiconic. ππ
π¦ where this page comes from
- arch rolling: dpkg 1.23.11-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms