summaryrefslogtreecommitdiff
path: root/apt
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-08-27 15:06:54 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2010-08-27 15:06:54 +0200
commit980c1cbd0d883c9e429aaa64633680456a0a776d (patch)
treee2c23a0808bc816dd3e1cda9cf2fe8189420ce72 /apt
parent6d564eafe80ebe60c91587dd1bb70a666b70485d (diff)
downloadpython-apt-980c1cbd0d883c9e429aaa64633680456a0a776d.tar.gz
add "provides" property to the apt.Version objects
Diffstat (limited to 'apt')
-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")