summaryrefslogtreecommitdiff
path: root/apt
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2008-07-14 13:15:32 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2008-07-14 13:15:32 +0200
commit5de8e3d1ecd159d5c27e62264b794cc1124b14fa (patch)
tree29bab228a8cf005819ff62d0f314d862b40b71d8 /apt
parent844d8f7494027c9dc205d528cafcc4fb2a64f61b (diff)
downloadpython-apt-5de8e3d1ecd159d5c27e62264b794cc1124b14fa.tar.gz
* apt/package.py:
- add "isAutoRemovable()" method
Diffstat (limited to 'apt')
-rw-r--r--apt/package.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/apt/package.py b/apt/package.py
index ac045969..096b1bd1 100644
--- a/apt/package.py
+++ b/apt/package.py
@@ -319,6 +319,14 @@ class Package(object):
return self.isInstalled and self._depcache.IsUpgradable(self._pkg)
isUpgradable = property(isUpgradable)
+ def isAutoRemovable(self):
+ """
+ Package is installed as a automatic dependency and is
+ no longer required
+ """
+ return self.isInstalled and self._depcache.IsGarbage(self._pkg)
+ isAutoRemovable = property(isAutoRemovable)
+
# size
def packageSize(self):
""" The size of the candidate deb package """