From f7adc2d7205e2fdbff7d808e8e4c262b65e3e05d Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 5 Apr 2011 11:27:04 +0200 Subject: Add an 'is_multi_arch' attribute to apt_pkg.Cache --- python/cache.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'python/cache.cc') 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(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, -- cgit v1.2.3