summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Plugins/Packages/Portage.py
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2013-03-12 03:30:04 +0100
committerAlexander Sulfrian <alexander@sulfrian.net>2015-02-07 19:49:47 +0100
commit586346b84755e6c070a8721ce2557a61374f29e7 (patch)
tree3e7693f270c7b36a71dfca93db6be0763bf80d17 /src/lib/Bcfg2/Server/Plugins/Packages/Portage.py
parent3d6f1cf190c0938f3d4f591f725262f3be9b2b94 (diff)
downloadbcfg2-586346b84755e6c070a8721ce2557a61374f29e7.tar.gz
bcfg2-586346b84755e6c070a8721ce2557a61374f29e7.tar.bz2
bcfg2-586346b84755e6c070a8721ce2557a61374f29e7.zip
Plugins/Packages/Layman: add support for layman overlays
In combination with the PortageCollection the Packages plugin could now handle layman overlays. The Portage collection evaluates the dependencies with respect to the configured overlays.
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugins/Packages/Portage.py')
-rw-r--r--src/lib/Bcfg2/Server/Plugins/Packages/Portage.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/Packages/Portage.py b/src/lib/Bcfg2/Server/Plugins/Packages/Portage.py
index a74bf5e4a..4ddadb701 100644
--- a/src/lib/Bcfg2/Server/Plugins/Packages/Portage.py
+++ b/src/lib/Bcfg2/Server/Plugins/Packages/Portage.py
@@ -6,6 +6,7 @@ import lxml.etree
import Bcfg2.Options
import Bcfg2.Server.Plugin
from Bcfg2.Server.Plugins.Packages.Collection import Collection
+from Bcfg2.Server.Plugins.Packages.Layman import LaymanSource
_portage_python = '/usr/lib/portage/pym/'
@@ -146,6 +147,13 @@ class PortageCollection(Collection):
env = portage.settings.configdict['backupenv']
+ # add layman overlays
+ env['PORTDIR_OVERLAY'] = ''
+ for overlay in self:
+ if isinstance(overlay, LaymanSource):
+ env['PORTDIR_OVERLAY'] += ' '
+ env['PORTDIR_OVERLAY'] += overlay.dir
+
portage.settings = portage.package.ebuild.config.config(
config_root=portage.settings['PORTAGE_CONFIGROOT'],
target_root=portage.settings['ROOT'],