summaryrefslogtreecommitdiff
path: root/portato/backend/system_interface.py
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2009-10-05 15:38:42 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2009-10-05 15:38:42 +0200
commitb859cb5199b63e28a0f6470e0ddf8658d6304ad9 (patch)
tree21cae5c3280473fe176befec2300e1b928e1dfc0 /portato/backend/system_interface.py
parent5ae4fda6f6fdcc8a21253dd6dc9d6051c99af34f (diff)
parent2fae9ac523385f61d192e9eeb664002c4a952a01 (diff)
downloadportato-b859cb5199b63e28a0f6470e0ddf8658d6304ad9.tar.gz
portato-b859cb5199b63e28a0f6470e0ddf8658d6304ad9.tar.bz2
portato-b859cb5199b63e28a0f6470e0ddf8658d6304ad9.zip
Reworked the World List stuff to be more usable and better coded
Diffstat (limited to 'portato/backend/system_interface.py')
-rw-r--r--portato/backend/system_interface.py18
1 files changed, 16 insertions, 2 deletions
diff --git a/portato/backend/system_interface.py b/portato/backend/system_interface.py
index be79de2..f0bfdf6 100644
--- a/portato/backend/system_interface.py
+++ b/portato/backend/system_interface.py
@@ -68,6 +68,18 @@ class SystemInterface (object):
"""
raise NotImplementedError
+
+ def compare_versions(self, v1, v2):
+ """Compares two CPVs; returns -1, 0, 1.
+
+ @param v1: one CPV
+ @type v1: cpv
+ @param v2: the second CPV
+ @type v2: cpv
+ @returns: -1, 0 or 1
+ @rtype: int"""
+
+ raise NotImplementedError
def find_best(self, list, only_cpv = False):
"""Returns the best package out of a list of packages.
@@ -134,11 +146,13 @@ class SystemInterface (object):
raise NotImplementedError
- def sort_package_list(self, pkglist):
+ def sort_package_list(self, pkglist, only_cpv = False):
"""Sorts a package list in the same manner portage does.
@param pkglist: list to sort
- @type pkglist: Packages[]
+ @type pkglist: Packages[] or cpv[]
+ @param only_cpv: flags whether the passed list consists of Packages or of CPVs
+ @type: bool
"""
raise NotImplementedError