summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2013-10-08 21:09:08 +0200
committerJulian Andres Klode <jak@debian.org>2013-10-08 21:09:08 +0200
commitd0739a17f824a7bf3cfa217223b88979c571e7dd (patch)
treeb24e85001c811ac265621c87d9c814d8a655217b
parent29415534292efd2b0c4d2306857ad5c7db5369c5 (diff)
downloadpython-apt-d0739a17f824a7bf3cfa217223b88979c571e7dd.tar.gz
apt/package.py: Add a Package.has_config_files property (Closes: #712749)
The name might be a bit misleading, but I cannot find a short name that completely describes this check.
-rw-r--r--apt/package.py5
-rw-r--r--debian/changelog2
2 files changed, 7 insertions, 0 deletions
diff --git a/apt/package.py b/apt/package.py
index f311eaff..f5aa5237 100644
--- a/apt/package.py
+++ b/apt/package.py
@@ -1051,6 +1051,11 @@ class Package(object):
"""Return True if the installed package is broken."""
return self._pcache._depcache.is_now_broken(self._pkg)
+ @property
+ def has_config_files(self):
+ """Checks whether the package is is the config-files state."""
+ return self. _pkg.current_state == apt_pkg.CURSTATE_CONFIG_FILES
+
# depcache actions
def mark_keep(self):
diff --git a/debian/changelog b/debian/changelog
index 06a8ca4f..b994b62d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,6 +12,8 @@ python-apt (0.9.0) UNRELEASED; urgency=low
- Document correct use of uniq and hide it using __all__ (Closes: #723815)
* python/apt_pkgmodule.cc:
- Fix documentation of version_compare (Closes: #680891)
+ * apt/package.py:
+ - Add a Package.has_config_files property (Closes: #712749)
[ Jeremy Bicha ]
* data/templates/Ubuntu.info.in: add 'devel' series (Closes: #722961)