From 5de8e3d1ecd159d5c27e62264b794cc1124b14fa Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 14 Jul 2008 13:15:32 +0200 Subject: * apt/package.py: - add "isAutoRemovable()" method --- apt/package.py | 8 ++++++++ debian/changelog | 2 ++ 2 files changed, 10 insertions(+) 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 e15a9a96..27004cfa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,8 @@ python-apt (0.7.7) unstable; urgency=low Ryan Hass for the test-case) LP: #243630 * tests/test_hashsums.py: - add tests for the hashsum code + * apt/package.py: + - add "isAutoRemovable()" method -- Michael Vogt Fri, 04 Jul 2008 19:53:28 +0200 -- cgit v1.2.3