From 200249fc4f0fccd19e12e1abcb718c08df0bf752 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Fri, 21 Aug 2009 14:57:44 +0200 Subject: apt/package.py: Add Package.is_now_broken and Package.is_inst_broken. --- apt/package.py | 10 ++++++++++ debian/changelog | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/apt/package.py b/apt/package.py index e33078d8..59fb8cfa 100644 --- a/apt/package.py +++ b/apt/package.py @@ -1008,6 +1008,16 @@ class Package(object): """ return VersionList(self) + @property + def is_inst_broken(self): + """Return True if the to-be-installed package is broken.""" + return self._pcache._depcache.IsInstBroken(self._pkg) + + @property + def is_now_broken(self): + """Return True if the installed package is broken.""" + return self._pcache._depcache.IsNowBroken(self._pkg) + # depcache actions def markKeep(self): diff --git a/debian/changelog b/debian/changelog index 7ab2fda4..d91b90a5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,8 +9,9 @@ python-apt (0.7.12.2) UNRELEASED; urgency=low - Introduce Version.get_dependencies() which takes one or more types of dependencies and returns a list of Dependency objects. - Do not mark the package as manually installed on upgrade (Closes: #542699) + - Add Package.is_now_broken and Package.is_inst_broken. - -- Julian Andres Klode Thu, 20 Aug 2009 23:13:00 +0200 + -- Julian Andres Klode Fri, 21 Aug 2009 14:57:08 +0200 python-apt (0.7.12.1) unstable; urgency=low -- cgit v1.2.3