summaryrefslogtreecommitdiff
path: root/python/cache.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2011-04-05 11:27:04 +0200
committerJulian Andres Klode <jak@debian.org>2011-04-05 11:27:04 +0200
commitf7adc2d7205e2fdbff7d808e8e4c262b65e3e05d (patch)
tree70787e8ed3e60132494261fa9115a978c03fdb96 /python/cache.cc
parent21c9ebb9717ed7b157c697a57d1b6ce3225eb9d6 (diff)
downloadpython-apt-f7adc2d7205e2fdbff7d808e8e4c262b65e3e05d.tar.gz
Add an 'is_multi_arch' attribute to apt_pkg.Cache
Diffstat (limited to 'python/cache.cc')
-rw-r--r--python/cache.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/python/cache.cc b/python/cache.cc
index 190d4f27..b5ebcce4 100644
--- a/python/cache.cc
+++ b/python/cache.cc
@@ -222,11 +222,18 @@ static PyObject *PkgCacheGetFileList(PyObject *Self, void*) {
return List;
}
+static PyObject *PkgCacheGetIsMultiArch(PyObject *Self, void*) {
+ pkgCache *Cache = GetCpp<pkgCache *>(Self);
+ PyBool_FromLong(Cache->MultiArchCache());
+}
+
static PyGetSetDef PkgCacheGetSet[] = {
{"depends_count",PkgCacheGetDependsCount,0,
"The number of apt_pkg.Dependency objects stored in the cache."},
{"file_list",PkgCacheGetFileList,0,
"A list of apt_pkg.PackageFile objects stored in the cache."},
+ {"is_multi_arch", PkgCacheGetIsMultiArch, 0,
+ "Whether the cache supports multi-arch."},
{"package_count",PkgCacheGetPackageCount,0,
"The number of apt_pkg.Package objects stored in the cache."},
{"package_file_count",PkgCacheGetPackageFileCount,0,