summaryrefslogtreecommitdiff
path: root/geneticone/backend/portage_helper.py
diff options
context:
space:
mode:
Diffstat (limited to 'geneticone/backend/portage_helper.py')
-rw-r--r--geneticone/backend/portage_helper.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/geneticone/backend/portage_helper.py b/geneticone/backend/portage_helper.py
index aab9426..58f0081 100644
--- a/geneticone/backend/portage_helper.py
+++ b/geneticone/backend/portage_helper.py
@@ -1,5 +1,5 @@
#
-# File: geneticone/portage_helper.py
+# File: geneticone/backend/portage_helper.py
# This file is part of the Genetic/One-Project, a graphical portage-frontend.
#
# Copyright (C) 2006 Necoro d.M.
@@ -9,9 +9,6 @@
#
# Written by Necoro d.M. <necoro@necoro.net> et.al.
-from geneticone import *
-import geneticone
-
import re
import os
@@ -19,6 +16,9 @@ import gentoolkit
import portage
from portage_util import unique_array
+from geneticone.backend import *
+import package
+
def find_lambda (name):
"""Returns the function needed by all the find_all_*-functions. Returns None if no name is given.
@param name: name to build the function of
@@ -33,12 +33,12 @@ def find_lambda (name):
return lambda x: True
def geneticize_list (list_of_packages):
- """Convertes a list of gentoolkit.Packages into L{geneticone.Packages}.
+ """Convertes a list of gentoolkit.Packages into L{geneticone.backend.Packages}.
@param list_of_packages: the list of packages
@type list_of_packages: list of gentoolkit.Packages
@returns: converted list
- @rtype: list of geneticone.Packages"""
- return [geneticone.Package(x) for x in list_of_packages]
+ @rtype: list of geneticone.backend.Packages"""
+ return [package.Package(x) for x in list_of_packages]
def find_best_match (search_key, only_installed = False):
"""Finds the best match in the portage tree."""
@@ -48,7 +48,7 @@ def find_best_match (search_key, only_installed = False):
else:
t = vartree.dep_bestmatch(search_key)
if t:
- return geneticone.Package(t)
+ return package.Package(t)
return None
def find_packages (search_key, masked=False):
@@ -89,14 +89,14 @@ def find_all_world_files (name=None):
Returns ALL world packages if name is None."""
world = filter(find_lambda(name), [x.get_cpv() for x in find_world_packages()[0]])
world = unique_array(world)
- return [geneticone.Package(x) for x in world]
+ return [package.Package(x) for x in world]
def find_all_system_files (name=None):
"""Returns a list of all system packages matching ".*name.*".
Returns ALL system packages if name is None."""
sys = filter(find_lambda(name), [x.get_cpv() for x in find_system_packages()[0]])
sys = unique_array(sys)
- return [geneticone.Package(x) for x in sys]
+ return [package.Package(x) for x in sys]
def list_categories (name=None):
"""Returns a list of categories matching ".*name.*" or all categories."""
> 2008-03-18corrected header commentRené 'Necoro' Neumann1-2/+2 2008-03-18Removed gtk subdirRené 'Necoro' Neumann21-134/+79 2008-03-18Removed wrapperRené 'Necoro' Neumann2-238/+184 2008-03-18Split and renamed gui_helperRené 'Necoro' Neumann4-249/+266 2008-03-18Splitted windows.pyRené 'Necoro' Neumann10-424/+549 2008-03-12Moved get_dependencies to top package classRené 'Necoro' Neumann4-50/+85 2008-03-11improved performance by caching the use_expand queriesRené 'Necoro' Neumann1-5/+14 2008-03-11use catapult varsRené 'Necoro' Neumann2-4/+6 2008-03-11Updated catapult stuffRené 'Necoro' Neumann5-56/+108 2008-03-10Generate correct KeyNotFoundExceptionRené 'Necoro' Neumann1-2/+2 2008-03-09Small changesRené 'Necoro' Neumann3-1/+4 2008-03-07Better session handlingRené 'Necoro' Neumann1-5/+54 2008-03-07Small changesRené 'Necoro' Neumann1-1/+4 2008-03-07Updated shm module to 1.2René 'Necoro' Neumann1-8/+21 2008-03-07Update TODORené 'Necoro' Neumann1-3/+1 2008-03-07hmm ... yesRené 'Necoro' Neumann1-1/+1 2008-03-06Used better exceptions for configuration parserRené 'Necoro' Neumann1-26/+114 2008-03-06Update translationRené 'Necoro' Neumann2-349/+393 2008-03-06Update createpot.shRené 'Necoro' Neumann1-3/+2 2008-03-06Use 'nofork' instead of 'nolistener'René 'Necoro' Neumann1-3/+3 2008-03-05Install glade files into template dir and not data dirRené 'Necoro' Neumann2-2/+1 2008-03-05Added dependency listRené 'Necoro' Neumann3-117/+237