From 22ab3421fbb8e936c3e6e32175a04ad801d7f511 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 21 Mar 2011 14:35:41 +0100 Subject: - add optional parameter to allow parse_depends() to keep the multiarch parameter * tests/test_deps.py: - add test forapt_pkg.parse_depends(strip_multiarch=True) --- doc/source/library/apt_pkg.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/source/library/apt_pkg.rst b/doc/source/library/apt_pkg.rst index f1bc4845..81358bac 100644 --- a/doc/source/library/apt_pkg.rst +++ b/doc/source/library/apt_pkg.rst @@ -1731,7 +1731,7 @@ Dependencies The following two functions provide the ability to parse dependencies. They use the same format as :attr:`Version.depends_list_str`. -.. function:: parse_depends(depends) +.. function:: parse_depends(depends, strip_multiarch=True) Parse the string *depends* which contains dependency information as specified in Debian Policy, Section 7.1. @@ -1743,6 +1743,9 @@ use the same format as :attr:`Version.depends_list_str`. >>> apt_pkg.parse_depends("PkgA (>= VerA) | PkgB (>= VerB)") [[('PkgA', 'VerA', '>='), ('PkgB', 'VerB', '>=')]] + Note that multiarch dependency information is stripped off by default. + You can force the full dependency info (including the multiarch info) + by passing "False" as a additional parameter to this function. .. note:: -- cgit v1.2.3