summaryrefslogtreecommitdiff
path: root/apt/package.py
diff options
context:
space:
mode:
Diffstat (limited to 'apt/package.py')
-rw-r--r--apt/package.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/apt/package.py b/apt/package.py
index 4104f93e..cb373c2e 100644
--- a/apt/package.py
+++ b/apt/package.py
@@ -707,6 +707,9 @@ class Package(object):
return '<Package: name:%r architecture=%r id:%r>' % (self._pkg.name,
self._pkg.architecture, self._pkg.id)
+ def __cmp__(self, other):
+ return cmp(self.name, other.name)
+
def candidate(self):
"""Return the candidate version of the package.