info > Dpkg::Deps

Not found locally for Dpkg::Deps. Try Google search

πŸ“– NAME

Dpkg::Deps - parse and manipulate dependencies of Debian packages

πŸš€ Quick Reference

Use CaseCommandDescription
Parse a dependency line deps_parse($line) Returns a Dpkg::Deps::AND or Union object from a dependency string
Check implication of relations deps_eval_implication($rel_p, $v_p, $rel_q, $v_q) Returns 1 if p implies q, 0 if p implies not q, undef otherwise
Concatenate multiple dependency lines deps_concat(@dep_list) Joins lines with ", " into a single valid string
Iterate over dependency elements deps_iterate($deps, $callback_func) Visits each element, stops on callback returning false
Compare two dependency objects deps_compare($a, $b) Used for sorting dependency objects

πŸ” DESCRIPTION

The Dpkg::Deps module provides classes implementing various types of dependencies.

The most important function is deps_parse(), it turns a dependency line in a set of Dpkg::Deps::{Simple,AND,OR,Union} objects depending on the case.

βš™οΈ FUNCTIONS

All the deps_* functions are exported by default.

πŸ”— deps_eval_implication($rel_p, $v_p, $rel_q, $v_q)

($rel_p, $v_p) and ($rel_q, $v_q) express two dependencies as (relation, version). The relation variable can have the following values that are exported by Dpkg::Version: REL_EQ, REL_LT, REL_LE, REL_GT, REL_GT.

This functions returns 1 if the "p" dependency implies the "q" dependency. It returns 0 if the "p" dependency implies that "q" is not satisfied. It returns undef when there's no implication.

The $v_p and $v_q parameter should be Dpkg::Version objects.

πŸ”— deps_concat(@dep_list)

This function concatenates multiple dependency lines into a single line, joining them with ", " if appropriate, and always returning a valid string.

πŸ”— deps_parse($line, %options)

This function parses the dependency line and returns an object, either a Dpkg::Deps::AND or a Dpkg::Deps::Union. Various options can alter the behaviour of that function.

πŸ”— deps_iterate($deps, $callback_func)

This function visits all elements of the dependency object, calling the callback function for each element.

The callback function is expected to return true when everything is fine, or false if something went wrong, in which case the iteration will stop.

Return the same value as the callback function.

πŸ”— deps_compare($a, $b)

Implements a comparison operator between two dependency objects. This function is mainly used to implement the sort() method.

πŸ“š CLASSES - Dpkg::Deps::*

There are several kind of dependencies. A Dpkg::Deps::Simple dependency represents a single dependency statement (it relates to one package only). Dpkg::Deps::Multiple dependencies are built on top of this class and combine several dependencies in different manners. Dpkg::Deps::AND represents the logical "AND" between dependencies while Dpkg::Deps::OR represents the logical "OR". Dpkg::Deps::Multiple objects can contain Dpkg::Deps::Simple object as well as other Dpkg::Deps::Multiple objects.

In practice, the code is only meant to handle the realistic cases which, given Debian's dependencies structure, imply those restrictions: AND can contain Simple or OR objects, OR can only contain Simple objects.

Dpkg::Deps::KnownFacts is a special class that is used while evaluating dependencies and while trying to simplify them. It represents a set of installed packages along with the virtual packages that they might provide.

πŸ”„ CHANGES

Version 1.07 (dpkg 1.20.0)

New option: Add virtual option to Dpkg::Deps::deps_parse().

Version 1.06 (dpkg 1.18.7; module version bumped on dpkg 1.18.24)

New option: Add tests_dep option to Dpkg::Deps::deps_parse().

Version 1.05 (dpkg 1.17.14)

New function: Dpkg::Deps::deps_iterate().

Version 1.04 (dpkg 1.17.10)

New options: Add use_profiles, build_profiles, reduce_profiles and reduce_restrictions to Dpkg::Deps::deps_parse().

Version 1.03 (dpkg 1.17.0)

New option: Add build_arch option to Dpkg::Deps::deps_parse().

Version 1.02 (dpkg 1.17.0)

New function: Dpkg::Deps::deps_concat()

Version 1.01 (dpkg 1.16.1)

<Used to document changes to Dpkg::Deps::* modules before they were split.>

Version 1.00 (dpkg 1.15.6)

Mark the module as public.


1.21.1 2025-09-09 Dpkg::Deps(3perl)

Dpkg::Deps
πŸ“– NAME πŸš€ Quick Reference πŸ” DESCRIPTION βš™οΈ FUNCTIONS
πŸ”— deps_eval_implication($rel_p, $v_p, $rel_q, $v_q) πŸ”— deps_concat(@dep_list) πŸ”— deps_parse($line, %options) πŸ”— deps_iterate($deps, $callback_func) πŸ”— deps_compare($a, $b)
πŸ“š CLASSES - Dpkg::Deps::* πŸ”„ CHANGES
Version 1.07 (dpkg 1.20.0) Version 1.06 (dpkg 1.18.7; module version bumped on dpkg 1.18.24) Version 1.05 (dpkg 1.17.14) Version 1.04 (dpkg 1.17.10) Version 1.03 (dpkg 1.17.0) Version 1.02 (dpkg 1.17.0) Version 1.01 (dpkg 1.16.1) Version 1.00 (dpkg 1.15.6)

Generated by phpman v4.10.0-7-g98e9fd5 Author: Che Dong Under GNU General Public License
2026-09-09 12:47 @2600:1f28:365:80b0:60b0:dfa5:fbc9:9f8f
CrawledBy CCBot/2.0 (https://commoncrawl.org/faq/)
Valid XHTML 1.0 Transitional!Valid CSS!