summaryrefslogtreecommitdiff
path: root/portato
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2009-11-05 18:01:51 +0100
committerRené 'Necoro' Neumann <necoro@necoro.net>2009-11-05 18:01:51 +0100
commit4741f013d2a028fce7cbf0e186707845ab47364c (patch)
tree80fb5201c446a3d94df579d3c9ad552a18b44c92 /portato
parenta96791f54721f8af95358b28d16d01b93ae7b1b7 (diff)
downloadportato-4741f013d2a028fce7cbf0e186707845ab47364c.tar.gz
portato-4741f013d2a028fce7cbf0e186707845ab47364c.tar.bz2
portato-4741f013d2a028fce7cbf0e186707845ab47364c.zip
Remove the 'geneticize_list' stuff. It is so ancient, it stinks :P
Diffstat (limited to '')
-rw-r--r--portato/backend/portage/system.py25
1 files changed, 6 insertions, 19 deletions
diff --git a/portato/backend/portage/system.py b/portato/backend/portage/system.py
index 03e3955..b2a48bb 100644
--- a/portato/backend/portage/system.py
+++ b/portato/backend/portage/system.py
@@ -167,24 +167,6 @@ class PortageSystem (SystemInterface):
else:
return lambda x: True
- def geneticize_list (self, list_of_packages, only_cpv = False):
- """Convertes a list of cpv's into L{backend.Package}s.
-
- @param list_of_packages: the list of packages
- @type list_of_packages: string[]
- @param only_cpv: do nothing - return the passed list
- @type only_cpv: boolean
- @returns: converted list
- @rtype: PortagePackage[]
- """
-
- if not only_cpv:
- return [self.new_package(x) for x in list_of_packages]
- elif not isinstance(list_of_packages, list):
- return list(list_of_packages)
- else:
- return list_of_packages
-
def get_global_settings (self, key):
return self.settings.global_settings[key]
@@ -222,7 +204,12 @@ class PortageSystem (SystemInterface):
return self.setmap[pkgSet]()
def find_packages (self, key = "", pkgSet = SystemInterface.SET_ALL, masked = False, with_version = True, only_cpv = False):
- return self.geneticize_list(self._get_set(pkgSet).find(key, masked, with_version, only_cpv), only_cpv or not with_version)
+ result = self._get_set(pkgSet).find(key, masked, with_version, only_cpv)
+
+ if (not only_cpv) and with_version:
+ result = map(self.new_package, result)
+
+ return result
def list_categories (self, name = None):
categories = self.settings.global_settings.categories