diff options
author | René 'Necoro' Neumann <necoro@necoro.net> | 2009-02-07 22:08:35 +0100 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.net> | 2009-02-07 22:08:35 +0100 |
commit | 5d432855b6226cf79e93f80ca215485d5263722c (patch) | |
tree | 710b2be7ef25a562425839c622c523c3ea07f12e /portato/backend | |
parent | c35e44d067409e5693be0b2cfbfa9054fd5ceff4 (diff) | |
download | portato-5d432855b6226cf79e93f80ca215485d5263722c.tar.gz portato-5d432855b6226cf79e93f80ca215485d5263722c.tar.bz2 portato-5d432855b6226cf79e93f80ca215485d5263722c.zip |
Small portage-2.2 set changes
Diffstat (limited to '')
-rw-r--r-- | portato/backend/portage/sets.py | 8 | ||||
-rw-r--r-- | portato/backend/portage/system_22.py | 15 |
2 files changed, 13 insertions, 10 deletions
diff --git a/portato/backend/portage/sets.py b/portato/backend/portage/sets.py index 53025ab..d8ea832 100644 --- a/portato/backend/portage/sets.py +++ b/portato/backend/portage/sets.py @@ -63,12 +63,11 @@ class FilterSet (Set): class PortageSet (FilterSet): def __init__ (self, name): - FilterSet.__init__(self) debug("Loading portage set '%s'", name) - self.portageSet = system.settings.setsconfig.getSets()[name] + self.name = name def get_list(self): - return itt.imap(str, self.portageSet.getAtoms()) + return itt.imap(str, system.settings.setsconfig.getSetAtoms(self.name)) class SystemSet (FilterSet): @@ -86,6 +85,9 @@ class WorldSet (FilterSet): yield cp class InstalledSet (Set): + """For the moment do not use the portage-2.2 @installed set. + It only contains the current slot-cps - and to get the cpvs + via the PortageSet results in an infinite recursion :(.""" def get_pkgs (self, key, is_regexp, masked, with_version, only_cpv): if is_regexp: diff --git a/portato/backend/portage/system_22.py b/portato/backend/portage/system_22.py index 8ce3cd9..7e0198c 100644 --- a/portato/backend/portage/system_22.py +++ b/portato/backend/portage/system_22.py @@ -32,10 +32,10 @@ class PortageSystem_22 (PortageSystem): self.local_use_descs = defaultdict(dict) self.setmap = { - self.SET_ALL : syssets.AllSet, - self.SET_INSTALLED : syssets.InstalledSet, - self.SET_UNINSTALLED : syssets.UninstalledSet, - self.SET_TREE : syssets.TreeSet + self.SET_ALL : syssets.AllSet(), + self.SET_INSTALLED : syssets.InstalledSet(), + self.SET_UNINSTALLED : syssets.UninstalledSet(), + self.SET_TREE : syssets.TreeSet() } def get_update_option (self): @@ -56,9 +56,10 @@ class PortageSystem_22 (PortageSystem): s = self.setmap.get(pkgSet, None) if s is None: - return syssets.PortageSet(pkgSet) - else: - return s() + s = syssets.PortageSet(pkgSet) + self.setmap[pkgSet] = s + + return s def new_package (self, cpv): return PortagePackage_22(cpv) |