diff options
Diffstat (limited to 'portato/backend/portage/package.py')
-rw-r--r-- | portato/backend/portage/package.py | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/portato/backend/portage/package.py b/portato/backend/portage/package.py index 2b40e41..b34e3ef 100644 --- a/portato/backend/portage/package.py +++ b/portato/backend/portage/package.py @@ -3,7 +3,7 @@ # File: portato/backend/portage/package.py # This file is part of the Portato-Project, a graphical portage-frontend. # -# Copyright (C) 2006-2009 René 'Necoro' Neumann +# Copyright (C) 2006-2010 René 'Necoro' Neumann # This is free software. You may redistribute copies of it under the terms of # the GNU General Public License version 2. # There is NO WARRANTY, to the extent permitted by law. @@ -294,18 +294,8 @@ class PortagePackage (Package): return self.get_package_settings("USE", installed = True).split() else: return [] - def compare_version(self,other): - v1 = self._scpv - v2 = portage.catpkgsplit(other.get_cpv()) - # if category is different - if v1[0] != v2[0]: - return cmp(v1[0],v2[0]) - # if name is different - elif v1[1] != v2[1]: - return cmp(v1[1],v2[1]) - # Compare versions - else: - return portage.pkgcmp(v1[1:],v2[1:]) + def __cmp__ (self, other): + return system.compare_versions(self.get_cpv(), other.get_cpv()) def matches (self, criterion): # cpv_matches needs explicit slot info |