summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt/cache.py20
-rw-r--r--debian/changelog2
2 files changed, 22 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
diff --git a/debian/changelog b/debian/changelog
index 83422b00..73e9eab7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,8 @@ python-apt (0.7.11.2) unstable; urgency=low
* apt/cache.py:
- Correctly handle rootdir on second and later invocations of
open(), by calling InitSystem again. (LP: #320665).
+ - Provide broken_count, delete_count, install_count, keep_count
+ properties (Closes: #532338)
[ Stefano Zacchiroli ]
* debian/python-apt.doc-base: register the documentation with the