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 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'apt') 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): -- cgit v1.2.3