diff options
Diffstat (limited to 'roverlay/static')
-rw-r--r-- | roverlay/static/__init__.py | 5 | ||||
-rw-r--r-- | roverlay/static/depres.py | 29 |
2 files changed, 34 insertions, 0 deletions
diff --git a/roverlay/static/__init__.py b/roverlay/static/__init__.py new file mode 100644 index 0000000..13e7869 --- /dev/null +++ b/roverlay/static/__init__.py @@ -0,0 +1,5 @@ +# R Overlay -- not signleton but static access to certain objects +# Copyright 2006-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# currently used for testing diff --git a/roverlay/static/depres.py b/roverlay/static/depres.py new file mode 100644 index 0000000..a351f51 --- /dev/null +++ b/roverlay/static/depres.py @@ -0,0 +1,29 @@ +# R Overlay -- dependency resolution, static resolver access +# Copyright 2006-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +from roverlay.depres.channels import EbuildJobChannel +from roverlay.depres.depresolver import DependencyResolver + +_RESOLVER = None + +def resolver(): + """Returns the resolver.""" + global _RESOLVER + if _RESOLVER is None: + _RESOLVER = DependencyResolver() + return _RESOLVER +# --- end of resolver (...) --- + +def get_ebuild_channel ( name=None, logger=None ): + """Returns a communication channel to the dependency resolver. + + arguments: + name -- + logger -- + """ + return resolver().register_channel ( + EbuildJobChannel ( name=name, logger=logger ) + ) + +# --- end of get_resolver_channel (...) --- |