diff options
author | René 'Necoro' Neumann <necoro@necoro.net> | 2008-07-09 23:15:14 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.net> | 2008-07-09 23:15:14 +0200 |
commit | c592c0a400099e442508ec09284e188d03fb5444 (patch) | |
tree | bedd6f8053f1f5d84c9448508471af3b21937c91 /portato/backend/portage/sets.py | |
parent | eb87d40f4056e05f38609fc5e8482e21a7a4c42e (diff) | |
download | portato-c592c0a400099e442508ec09284e188d03fb5444.tar.gz portato-c592c0a400099e442508ec09284e188d03fb5444.tar.bz2 portato-c592c0a400099e442508ec09284e188d03fb5444.zip |
Added package sets of portage-2.2
Diffstat (limited to 'portato/backend/portage/sets.py')
-rw-r--r-- | portato/backend/portage/sets.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/portato/backend/portage/sets.py b/portato/backend/portage/sets.py index 2305c85..7984d3d 100644 --- a/portato/backend/portage/sets.py +++ b/portato/backend/portage/sets.py @@ -14,7 +14,14 @@ from __future__ import absolute_import, with_statement import re +import portage +try: + import portage.dep as portage_dep +except ImportError: + import portage_dep + from .. import system +from ...helper import debug class Set(object): @@ -57,6 +64,15 @@ class FilterSet (Set): return t +class PortageSet (FilterSet): + def __init__ (self, name): + FilterSet.__init__(self) + debug("Loading portage set '%s'", name) + self.portageSet = system.settings.setsconfig.getSets()[name] + + def get_list(self): + return self.portageSet.getAtoms() + class SystemSet (FilterSet): def get_list(self): @@ -126,3 +142,4 @@ class UninstalledSet (Set): def find (self, *args, **kwargs): return self.all.find(*args, **kwargs) - self.installed.find(*args, **kwargs) + |