summaryrefslogtreecommitdiff
path: root/apt/cache.py
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2009-07-30 14:39:56 +0200
committerJulian Andres Klode <jak@debian.org>2009-07-30 14:39:56 +0200
commit4e66ff1d8fea8631af4656d824b7d6f94f9486c4 (patch)
tree41ab61c7d5ea065eb2ee1783ad7c76637ce90ee0 /apt/cache.py
parent2b64e774ba825789caea80d9424faf1ac3be19d9 (diff)
downloadpython-apt-4e66ff1d8fea8631af4656d824b7d6f94f9486c4.tar.gz
apt/cache.py: Provide broken_count, delete_count, install_count, keep_count properties (Closes: #532338)
Diffstat (limited to 'apt/cache.py')
-rw-r--r--apt/cache.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/apt/cache.py b/apt/cache.py
index efa8afb3..31e14561 100644
--- a/apt/cache.py
+++ b/apt/cache.py
@@ -332,6 +332,26 @@ class Cache(object):
self._callbacks[name] = []
self._callbacks[name].append(callback)
+ @property
+ def broken_count(self):
+ """Return the number of packages with broken dependencies."""
+ return self._depcache.broken_count
+
+ @property
+ def delete_count(self):
+ """Return the number of packages marked for deletion."""
+ return self._depcache.del_count
+
+ @property
+ def install_count(self):
+ """Return the number of packages marked for installation."""
+ return self._depcache.inst_count
+
+ @property
+ def keep_count(self):
+ """Return the number of packages marked as keep."""
+ return self._depcache.keep_count
+
# ----------------------------- experimental interface