summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2009-08-21 14:57:44 +0200
committerJulian Andres Klode <jak@debian.org>2009-08-21 14:57:44 +0200
commit200249fc4f0fccd19e12e1abcb718c08df0bf752 (patch)
tree87d00d78cc72605d95f31b957b69a218d3eb2740
parentc31fb6542e64a7eb279d0b246da4ea15dc4d6af3 (diff)
downloadpython-apt-200249fc4f0fccd19e12e1abcb718c08df0bf752.tar.gz
apt/package.py: Add Package.is_now_broken and Package.is_inst_broken.
-rw-r--r--apt/package.py10
-rw-r--r--debian/changelog3
2 files changed, 12 insertions, 1 deletions
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 <jak@debian.org> Thu, 20 Aug 2009 23:13:00 +0200
+ -- Julian Andres Klode <jak@debian.org> Fri, 21 Aug 2009 14:57:08 +0200
python-apt (0.7.12.1) unstable; urgency=low