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>2014-02-26 13:38:17 +0100
commit784f1580709eae996134923b9fd5f557202d59cb (patch)
treeb6946cfe651d858d5479598c06e4c94db277d632 /src/lib/Bcfg2/Server/Plugins/Packages/Portage.py
parent9e5645f95fe5deedae084f371509888e514e19b0 (diff)
downloadbcfg2-784f1580709eae996134923b9fd5f557202d59cb.tar.gz
bcfg2-784f1580709eae996134923b9fd5f557202d59cb.tar.bz2
bcfg2-784f1580709eae996134923b9fd5f557202d59cb.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 938ddad4d..ac074f879 100644
--- a/src/lib/Bcfg2/Server/Plugins/Packages/Portage.py
+++ b/src/lib/Bcfg2/Server/Plugins/Packages/Portage.py
@@ -5,6 +5,7 @@ import os
import lxml.etree
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/'
@@ -149,6 +150,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'],