summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--portato/backend/portage/system.py14
-rw-r--r--portato/backend/system_interface.py2
-rw-r--r--portato/gui/utils.py2
3 files changed, 10 insertions, 8 deletions
diff --git a/portato/backend/portage/system.py b/portato/backend/portage/system.py
index adb9799..f92e34e 100644
--- a/portato/backend/portage/system.py
+++ b/portato/backend/portage/system.py
@@ -162,21 +162,23 @@ class PortageSystem (SystemInterface):
else:
pkgSet = "installed"
- t = self.find_packages(search_key, pkgSet = pkgSet, masked = masked, with_version = True)
+ t = self.find_packages(search_key, pkgSet = pkgSet, masked = masked, with_version = True, only_cpv = True)
if t:
return self.find_best(t)
- return t
+ return self.geneticize_list(t, only_cpv)
def find_packages (self, key = "", pkgSet = "all", masked = False, with_version = True, only_cpv = False):
-
+ if key is None: key = ""
+
is_regexp = key == "" or ("*" in key and key[0] not in ("*","=","<",">","~","!"))
def installed(key):
if is_regexp:
if with_version:
t = self.settings.vartree.dbapi.cpv_all()
+ else:
t = self.settings.vartree.dbapi.cp_all()
if key:
@@ -259,7 +261,7 @@ class PortageSystem (SystemInterface):
t = unique_array(t)
t.sort()
- return geneticize_list(t, only_cpv or not with_version)
+ return self.geneticize_list(t, only_cpv or not with_version)
def __find_resolved_unresolved (self, list, check, only_cpv = False):
"""Checks a given list and divides it into a "resolved" and an "unresolved" part.
@@ -337,7 +339,7 @@ class PortageSystem (SystemInterface):
return new_packages
def get_updated_packages (self):
- packages = self.get_new_packages(self.find_packages(set = "installed", with_version = False))
+ packages = self.get_new_packages(self.find_packages(pkgSet = "installed", with_version = False))
packages = [x for x in packages if x is not None and not x.is_installed()]
return packages
@@ -353,7 +355,7 @@ class PortageSystem (SystemInterface):
world.close()
# append system packages
- packages.extend(unique_array([p.get_cp() for p in self.find_packages(set = "system")]))
+ packages.extend(unique_array([p.get_cp() for p in self.find_packages(pkgSet = "system")]))
states = [(["RDEPEND"], True)]
if self.with_bdeps():
diff --git a/portato/backend/system_interface.py b/portato/backend/system_interface.py
index c22c857..4b0f8df 100644
--- a/portato/backend/system_interface.py
+++ b/portato/backend/system_interface.py
@@ -75,7 +75,7 @@ class SystemInterface (object):
raise NotImplementedError
- def find_packages (self, key, set = "all", masked = False, with_version = True, only_cpv = False):
+ def find_packages (self, key, pkgSet = "all", masked = False, with_version = True, only_cpv = False):
"""This returns a list of packages matching the key.
As key, it is allowed to use basic regexps (".*") and the normal package specs. But not a combination
of them.
diff --git a/portato/gui/utils.py b/portato/gui/utils.py
index 7a3e8ee..59210e1 100644
--- a/portato/gui/utils.py
+++ b/portato/gui/utils.py
@@ -166,7 +166,7 @@ class Database (object):
# get the lists
packages = system.find_packages(category, with_version = False)
- installed = system.find_packages(category, set = "installed", with_version = False)
+ installed = system.find_packages(category, "installed", with_version = False)
# cycle through packages
for p in packages: