summaryrefslogtreecommitdiff
path: root/apt
diff options
context:
space:
mode:
Diffstat (limited to 'apt')
-rw-r--r--apt/debfile.py4
-rw-r--r--apt/package.py5
2 files changed, 7 insertions, 2 deletions
diff --git a/apt/debfile.py b/apt/debfile.py
index 9bf27da3..f4a31379 100644
--- a/apt/debfile.py
+++ b/apt/debfile.py
@@ -512,7 +512,7 @@ class DebPackage(object):
return sorted(content)
@staticmethod
- def to_hex(self, in_data):
+ def to_hex(in_data):
hex = ""
for (i, c) in enumerate(in_data):
if i%80 == 0:
@@ -521,7 +521,7 @@ class DebPackage(object):
return hex
@staticmethod
- def to_strish(self, in_data):
+ def to_strish(in_data):
s = ""
for c in in_data:
if ord(c) < 10 or ord(c) > 127:
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")