summaryrefslogtreecommitdiff
path: root/apt/package.py
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-08-31 15:34:04 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2010-08-31 15:34:04 +0200
commit3ec4a3676de540d05286f3bdc41f00a799244f3b (patch)
tree460e9e05ba521082d5f901fdd1452cbc9bf9c329 /apt/package.py
parent8cd715add7f85fb67cc30e42449d83a2ef7cf0bd (diff)
parent96476d01e881f52d53a70f1ae700594a0f321056 (diff)
downloadpython-apt-3ec4a3676de540d05286f3bdc41f00a799244f3b.tar.gz
* add "provides" property to the apt.Version objects
* apt/debfile.py: - fix error when reading binary content and add regresion test
Diffstat (limited to 'apt/package.py')
-rw-r--r--apt/package.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/apt/package.py b/apt/package.py
index 228a3385..871c1e16 100644
--- a/apt/package.py
+++ b/apt/package.py
@@ -415,6 +415,11 @@ class Version(object):
return depends_list
@property
+ def provides(self):
+ """ Return a list of names that this version provides."""
+ return [p[0] for p in self._cand.provides_list]
+
+ @property
def enhances(self):
"""Return the list of enhances for the package version."""
return self.get_dependencies("Enhances")