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 16dfc011..949de6cc 100644
--- a/apt/cache.py
+++ b/apt/cache.py
@@ -368,6 +368,26 @@ class Cache(object):
"""
return apt_pkg.ActionGroup(self._depcache)
+ @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
+
if apt_pkg._COMPAT_0_7:
_runCallbacks = function_deprecated_by(_run_callbacks)
getChanges = function_deprecated_by(get_changes)
diff --git a/debian/changelog b/debian/changelog
index 9809d423..97b49021 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,8 @@ python-apt (0.7.92) UNRELEASED; urgency=low
are sequences and also provide features of mappings. (small API BREAK)
* apt/progress/__init__.py: Check for EINTR in select (Closes: #499296)
* Add support for Enhances as a dependency type (Closes: #416247)
+ * apt/cache.py: Provide broken_count, delete_count, install_count, keep_count
+ properties (Closes: #532338)
[ Sebastian Heinlein ]
* apt/progress.py: Extract the package name from the status message