summaryrefslogtreecommitdiff
path: root/doc/source
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2011-04-05 15:18:12 +0200
committerJulian Andres Klode <jak@debian.org>2011-04-05 15:18:12 +0200
commit1c6ecaa6776498d27bcce81fa769a677a587215a (patch)
tree2b2589e1b4df8f4df59b25f866a9aa759f9f6d91 /doc/source
parent5cc6fcb55f1fa50094a56644178c5e728deb83a4 (diff)
downloadpython-apt-1c6ecaa6776498d27bcce81fa769a677a587215a.tar.gz
Support (name, arch) tuples in apt_pkg.Cache mappings, wrapping
FindPkg() with two string parameters.
Diffstat (limited to 'doc/source')
-rw-r--r--doc/source/library/apt_pkg.rst25
1 files changed, 23 insertions, 2 deletions
diff --git a/doc/source/library/apt_pkg.rst b/doc/source/library/apt_pkg.rst
index 709648ac..74bba8db 100644
--- a/doc/source/library/apt_pkg.rst
+++ b/doc/source/library/apt_pkg.rst
@@ -43,15 +43,36 @@ Working with the cache
of the cache). It may also be ``None``, in which case no progress will
be emitted. If not given, progress will be printed to standard output.
+ .. note::
+
+ The cache supports colon-seperated name:architecture pairs. For
+ normal architectures, they are equal to a (name, architecture)
+ tuple. For the the "any" architecture behavior is different, as
+ "name:any" is equivalent to ("name:any", "any"). This is done so
+ that "name:any" matches all packages with that name which have
+ Multi-Arch: allowed set.
+
.. describe:: cache[pkgname]
Return the :class:`Package()` object for the package name given by
- *pkgname*.
+ *pkgname*. If *pkgname* includes a colon, the part after the colon
+ is used as the architecture.
+
+ .. describe:: cache[name, architecture]
+
+ Return the :class:`Package()` object for the package with the given
+ name and architecture.
.. describe:: pkgname in cache
Check whether a package with the name given by *pkgname* exists in
- the cache.
+ the cache for the native architecture. If *pkgname* includes a
+ colon, the part after the colon is used as the architecture.
+
+ .. describe:: (name, architecture) in cache
+
+ Check whether a package with the given name and architecture exists
+ in the cache.
.. method:: update(progress, sources [, pulse_interval]) -> bool