diff options
| -rw-r--r-- | apt/package.py | 8 | ||||
| -rw-r--r-- | debian/changelog | 7 | ||||
| -rw-r--r-- | tests/hashsum_test.data | 1 | ||||
| -rw-r--r-- | tests/hashsum_test_with_zero.data | bin | 0 -> 7 bytes |
4 files changed, 16 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 """ diff --git a/debian/changelog b/debian/changelog index 36a168ad..2cc94c31 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +python-apt (0.7.6ubuntu3) intrepid; urgency=low + + * apt/package.py: + - add "isAutoRemovable()" method + + -- Michael Vogt <michael.vogt@ubuntu.com> Mon, 14 Jul 2008 15:18:03 +0100 + python-apt (0.7.6ubuntu2) intrepid; urgency=low * python/apt_pkgmodule.cc: diff --git a/tests/hashsum_test.data b/tests/hashsum_test.data new file mode 100644 index 00000000..19102815 --- /dev/null +++ b/tests/hashsum_test.data @@ -0,0 +1 @@ +foo
\ No newline at end of file diff --git a/tests/hashsum_test_with_zero.data b/tests/hashsum_test_with_zero.data Binary files differnew file mode 100644 index 00000000..2ec9a6df --- /dev/null +++ b/tests/hashsum_test_with_zero.data |
