diff options
author | René 'Necoro' Neumann <necoro@necoro.net> | 2009-02-17 01:09:31 +0100 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.net> | 2009-02-17 01:09:31 +0100 |
commit | 98105652b0e02d9c633a5e61ced64e30adb70cde (patch) | |
tree | f172a6f9deaed068874c0882a536f211188e6959 /portato | |
parent | 1ae51d3f1e14802ca545a58ce2a6a60a818f629f (diff) | |
download | portato-98105652b0e02d9c633a5e61ced64e30adb70cde.tar.gz portato-98105652b0e02d9c633a5e61ced64e30adb70cde.tar.bz2 portato-98105652b0e02d9c633a5e61ced64e30adb70cde.zip |
First part of fixing the search
Diffstat (limited to '')
-rw-r--r-- | portato/backend/portage/sets.py | 6 | ||||
-rw-r--r-- | portato/gui/windows/main.py | 3 |
2 files changed, 3 insertions, 6 deletions
diff --git a/portato/backend/portage/sets.py b/portato/backend/portage/sets.py index 59641df..dd8257d 100644 --- a/portato/backend/portage/sets.py +++ b/portato/backend/portage/sets.py @@ -52,7 +52,7 @@ class FilterSet (Set): t = set() for pkg in self.get_list(): if is_regexp and key: - if not re.match(key, pkg, re.I): continue + if not re.search(key, pkg, re.I): continue if not with_version: t.add(portage.dep.dep_getkey(pkg)) @@ -97,7 +97,7 @@ class InstalledSet (Set): t = system.settings.vartree.dbapi.cp_all() if key: - t = filter(lambda x: re.match(key, x, re.I), t) + t = filter(lambda x: re.search(key, x, re.I), t) return set(t) else: @@ -113,7 +113,7 @@ class TreeSet (Set): t = system.settings.porttree.dbapi.cp_all() if key: - t = filter(lambda x: re.match(key, x, re.I), t) + t = filter(lambda x: re.search(key, x, re.I), t) elif masked: t = system.settings.porttree.dbapi.xmatch("match-all", key) diff --git a/portato/gui/windows/main.py b/portato/gui/windows/main.py index 19fa35f..87a13dc 100644 --- a/portato/gui/windows/main.py +++ b/portato/gui/windows/main.py @@ -1616,9 +1616,6 @@ class MainWindow (Window): """Do a search.""" text = entry.get_text() if text != "": - if "/" not in text: - text = "/.*"+text # only look for package names - packages = system.find_packages(text, with_version = False) if packages == []: |