summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2009-07-08 20:59:15 +0200
committerJulian Andres Klode <jak@debian.org>2009-07-08 20:59:15 +0200
commit7d12f1ce6bc839f27604782bc712a0ccb481f2b2 (patch)
tree301634b52b9dcb24e43d9a736a29771ceb1ff5ea
parent3461ce22ec52b896f97aeb6d925f214098826c59 (diff)
downloadpython-apt-7d12f1ce6bc839f27604782bc712a0ccb481f2b2.tar.gz
doc/source/apt_pkg.rst: Update the documentation to reflect the latest changes.
-rw-r--r--apt/package.py2
-rw-r--r--doc/source/apt_pkg.rst44
2 files changed, 35 insertions, 11 deletions
diff --git a/apt/package.py b/apt/package.py
index 6d451eca..072e86ca 100644
--- a/apt/package.py
+++ b/apt/package.py
@@ -64,7 +64,7 @@ class BaseDependency(object):
Attributes defined here:
name - The name of the dependency
- relation - The relation (>>,>=,==,<<,<=,)
+ relation - The relation (>,>=,==,<,<=,)
version - The version depended on
pre_depend - Boolean value whether this is a pre-dependency.
"""
diff --git a/doc/source/apt_pkg.rst b/doc/source/apt_pkg.rst
index c814615c..2af934a0 100644
--- a/doc/source/apt_pkg.rst
+++ b/doc/source/apt_pkg.rst
@@ -947,22 +947,30 @@ Records
.. attribute:: build_depends
+ Return a dictionary representing the build-time dependencies of the
+ package. The format is the same as for :attr:`Version.depends_list_str`
+ and possible keys being ``"Build-Depends"``, ``"Build-Depends-Indep"``,
+ ``"Build-Conflicts"`` or ``"Build-Conflicts-Indep"``.
+
+ .. attribute:: BuildDepends
+
Return the list of Build dependencies, as
- ``(str: package, str: version, int: op, int: type)``.
+ ``(str: package, str: version, int: op, int: type)``. This is a
+ completely deprecated format
.. table:: Values of *op*
===== =============================================
Value Meaning
===== =============================================
- 0x0 No Operation (no versioned build dependency)
+ 0x00 No Operation (no versioned build dependency)
0x10 | (or) - this will be added to the other values
- 0x1 <= (less than or equal)
- 0x2 >= (greater than or equal)
- 0x3 << (less than)
- 0x4 >> (greater than)
- 0x5 == (equal)
- 0x6 != (not equal)
+ 0x01 <= (less than or equal)
+ 0x02 >= (greater than or equal)
+ 0x03 << (less than)
+ 0x04 >> (greater than)
+ 0x05 = (equal)
+ 0x06 != (not equal)
===== =============================================
.. table:: Values of *type*
@@ -983,7 +991,7 @@ Records
This results in::
- [('A', '1', 18, 0), # 18 = 16 + 2 = 0x10 + 0x2
+ [('A', '1', 18, 0), # 18 = (16 | 2) = (0x10 | 0x2)
('B', '1', 2, 0),
('C', '', 0, 0)]
@@ -1293,10 +1301,19 @@ Dependencies
>>> apt_pkg.parse_depends("PkgA (>= VerA) | PkgB (>= VerB)")
[[('PkgA', 'VerA', '>='), ('PkgB', 'VerB', '>=')]]
+
+ .. note::
+
+ The behavior of this function is different than the behavior of the
+ old function :func:`ParseDepends()`, because the third field
+ ``operation`` uses `>` instead of `>>` and `<` instead of `<<` which
+ is specified in control files.
+
+
.. function:: parse_src_depends(depends)
Parse the string *depends* which contains dependency information as
- specified in Debian Policy, Section 7.1.
+ specified in Debian Policy, Section 7.1.
Returns a list. The members of this list are lists themselves and contain
one or more tuples in the format ``(package,version,operation)`` for every
@@ -1312,6 +1329,13 @@ Dependencies
>>> apt_pkg.parse_src_depends("a (>= 01) [i386 amd64]")
[[('a', '01', '>=')]]
+ .. note::
+
+ The behavior of this function is different than the behavior of the
+ old function :func:`ParseDepends()`, because the third field
+ ``operation`` uses `>` instead of `>>` and `<` instead of `<<` which
+ is specified in control files.
+
Configuration
-------------