diff options
author | René 'Necoro' Neumann <necoro@necoro.net> | 2009-03-03 23:53:52 +0100 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.net> | 2009-03-03 23:53:52 +0100 |
commit | 4c786bef98d6d8244a1c6e28abc5dd448902ecdf (patch) | |
tree | af67e8eeb5bd3ae257b1f6e87997b0090082d3c5 /portato/backend | |
parent | c768119cc7ade2018f7ab0ae0da0515bee36de60 (diff) | |
parent | 6a6aba15ba92c805fe35da7dcbdaa37bacccb6fd (diff) | |
download | portato-4c786bef98d6d8244a1c6e28abc5dd448902ecdf.tar.gz portato-4c786bef98d6d8244a1c6e28abc5dd448902ecdf.tar.bz2 portato-4c786bef98d6d8244a1c6e28abc5dd448902ecdf.zip |
Some more 0.12 stuff
Diffstat (limited to '')
-rw-r--r-- | portato/backend/flags.py | 2 | ||||
-rw-r--r-- | portato/backend/portage/sets.py | 14 |
2 files changed, 12 insertions, 4 deletions
diff --git a/portato/backend/flags.py b/portato/backend/flags.py index baa1f37..0c3713d 100644 --- a/portato/backend/flags.py +++ b/portato/backend/flags.py @@ -411,7 +411,7 @@ def write_use_flags (): msg += "=%s %s" % (cpv, comb) else: # add on a per-package-base list = system.split_cpv(cpv) - msg += "%s/%s %s" % (list[0], list[1], combine) + msg += "%s/%s %s" % (list[0], list[1], comb) if not file in file_cache: with open(file, "a") as f: diff --git a/portato/backend/portage/sets.py b/portato/backend/portage/sets.py index dd8257d..234047b 100644 --- a/portato/backend/portage/sets.py +++ b/portato/backend/portage/sets.py @@ -28,7 +28,7 @@ class Set(object): def find (self, key, masked = False, with_version = True, only_cpv = False): if key is None: key = "" - is_regexp = key == "" or ("*" in key and key[0] not in ("*","=","<",">","~","!")) + is_regexp = key == "" or ("*" in key[1:] and key[0] not in ("=","<",">","~","!")) try: t = self.get_pkgs(key, is_regexp, masked, with_version, only_cpv) @@ -99,9 +99,12 @@ class InstalledSet (Set): if key: t = filter(lambda x: re.search(key, x, re.I), t) - return set(t) else: - return set(system.settings.vartree.dbapi.match(key)) + t = system.settings.vartree.dbapi.match(key) + if not with_version: + t = itt.imap(portage.dep.dep_getkey, t) + + return set(t) class TreeSet (Set): @@ -115,11 +118,16 @@ class TreeSet (Set): if key: t = filter(lambda x: re.search(key, x, re.I), t) + return set(t) + elif masked: t = system.settings.porttree.dbapi.xmatch("match-all", key) else: t = system.settings.porttree.dbapi.match(key) + if not with_version: + t = itt.imap(portage.dep.dep_getkey, t) + return set(t) class AllSet (Set): |