GNU/Linux |
Debian 7.3.0(Wheezy) |
|
![]() |
Dpkg::Deps(3) |
![]() |
Dpkg::Deps − parse and manipulate dependencies of Debian packages
The Dpkg::Deps module provides objects 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.
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.
my $dep = 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.
use_arch (defaults to 1)
Take into account the architecture restriction part of the dependencies. Set to 0 to completely ignore that information.
host_arch (defaults to the current architecture)
Define the host architecture. By default it uses Dpkg::Arch::get_host_arch() to identify the proper architecture.
reduce_arch (defaults to 0)
If set to 1, ignore dependencies that do not concern the current host architecture. This implicitely strips off the architecture restriction list so that the resulting dependencies are directly applicable to the current architecture.
union (defaults to 0)
If set to 1, returns a Dpkg::Deps::Union instead of a Dpkg::Deps::AND. Use this when parsing non-dependency fields like Conflicts.
build_dep (defaults to 0)
If set to 1, allow build-dep only arch qualifiers, that is
![]() |
Dpkg::Deps(3) | ![]() |