diff options
| author | Julian Andres Klode <jak@debian.org> | 2009-06-15 15:14:30 +0200 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2009-06-15 15:14:30 +0200 |
| commit | 56ce90ed8cc9ce939dd7904c9b07478b0c3b2071 (patch) | |
| tree | 18dbea7c39a5fc5729ce0f847f61aeb323ff921b /apt/cache.py | |
| parent | 7618780d7e0550897f87eecc4ab52d75b9c0ec39 (diff) | |
| download | python-apt-56ce90ed8cc9ce939dd7904c9b07478b0c3b2071.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.py | 20 |
1 files changed, 20 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) |
