Lines 92-112
Link Here
|
92 |
return (resolved,unresolved) |
92 |
return (resolved,unresolved) |
93 |
|
93 |
|
94 |
def find_all_installed_packages(prefilter=None): |
94 |
def find_all_installed_packages(prefilter=None): |
95 |
"""Returns a list of all installed packages, after applying the prefilter |
95 |
"""Returns a list of all installed package names, after applying the prefilter |
96 |
function""" |
96 |
function""" |
97 |
t = vartree.dbapi.cpv_all() |
97 |
t = vartree.dbapi.cpv_all() |
98 |
if prefilter: |
98 |
if prefilter: |
99 |
t = filter(prefilter,t) |
99 |
t = filter(prefilter,t) |
100 |
return [Package(x) for x in t] |
100 |
return t |
101 |
|
101 |
|
102 |
def find_all_uninstalled_packages(prefilter=None): |
102 |
def find_all_uninstalled_packages(prefilter=None): |
103 |
"""Returns a list of all uninstalled packages, after applying the prefilter |
103 |
"""Returns a list of all uninstalled packages names, after applying the prefilter |
104 |
function""" |
104 |
function""" |
105 |
alist = find_all_packages(prefilter) |
105 |
alist = find_all_packages(prefilter) |
106 |
return [x for x in alist if not x.is_installed()] |
106 |
return [x for x in alist if not Package(x).is_installed()] |
107 |
|
107 |
|
108 |
def find_all_packages(prefilter=None): |
108 |
def find_all_packages(prefilter=None): |
109 |
"""Returns a list of all known packages, installed or not, after applying |
109 |
"""Returns a list of all known package names installed or not, after applying |
110 |
the prefilter function""" |
110 |
the prefilter function""" |
111 |
t = portage.portdb.cp_all() |
111 |
t = portage.portdb.cp_all() |
112 |
if prefilter: |
112 |
if prefilter: |
Lines 114-120
Link Here
|
114 |
t2 = [] |
114 |
t2 = [] |
115 |
for x in t: |
115 |
for x in t: |
116 |
t2 += portage.portdb.cp_list(x) |
116 |
t2 += portage.portdb.cp_list(x) |
117 |
return [Package(x) for x in t2] |
117 |
return t2 |
118 |
|
118 |
|
119 |
def split_package_name(name): |
119 |
def split_package_name(name): |
120 |
"""Returns a list on the form [category, name, version, revision]. Revision will |
120 |
"""Returns a list on the form [category, name, version, revision]. Revision will |