summaryrefslogtreecommitdiff
path: root/portato/backend/system_interface.py
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2008-07-09 23:24:18 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2008-07-09 23:24:18 +0200
commitb166a860bc1d645208b6ecab5270b64fca34188b (patch)
treebed4d3025498d668f88fdb5ab07949f9b3890e27 /portato/backend/system_interface.py
parent107c4cc0c8f0039224505d29707ccc7eda4f5afb (diff)
parentc592c0a400099e442508ec09284e188d03fb5444 (diff)
downloadportato-b166a860bc1d645208b6ecab5270b64fca34188b.tar.gz
portato-b166a860bc1d645208b6ecab5270b64fca34188b.tar.bz2
portato-b166a860bc1d645208b6ecab5270b64fca34188b.zip
Merged in the portage-2.2 branch
Diffstat (limited to 'portato/backend/system_interface.py')
-rw-r--r--portato/backend/system_interface.py22
1 files changed, 21 insertions, 1 deletions
diff --git a/portato/backend/system_interface.py b/portato/backend/system_interface.py
index 4b0f8df..1cb0ed1 100644
--- a/portato/backend/system_interface.py
+++ b/portato/backend/system_interface.py
@@ -11,6 +11,26 @@
# Written by René 'Necoro' Neumann <necoro@necoro.net>
class SystemInterface (object):
+
+ SET_ALL = "__portato_all__"
+ SET_TREE = "__portato_tree__"
+ SET_INSTALLED = "__portato_installed__"
+ SET_UNINSTALLED = "__portato_uninstalled__"
+
+ def has_set_support (self):
+ """Signals, whether this backend supports sets.
+
+ @rtype: boolean
+ """
+ raise NotImplementedError
+
+ def get_sets (self):
+ """Returns all supported sets in tuples consisting of name and description.
+ If sets aren't supported, at least "world" and "system" have to be returned.
+
+ @rtype: iter(string, string)
+ """
+ raise NotImplementedError
def get_version (self):
"""Returns the version of the used backend.
@@ -75,7 +95,7 @@ class SystemInterface (object):
raise NotImplementedError
- def find_packages (self, key, pkgSet = "all", masked = False, with_version = True, only_cpv = False):
+ def find_packages (self, key, pkgSet = SET_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.