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-05-10 16:25:27 +0200
commit0d241e55c4cd60e534571fd8e19b69ebadc58a12 (patch)
treed5ca5dca6797a6926febc8b2f04d1eaf4ef4d77b /src/lib/Bcfg2/Server/Plugins/Packages/Portage.py
parent6db515b7110aa7a4248eab3e2e341c08ad9221f5 (diff)
downloadbcfg2-0d241e55c4cd60e534571fd8e19b69ebadc58a12.tar.gz
bcfg2-0d241e55c4cd60e534571fd8e19b69ebadc58a12.tar.bz2
bcfg2-0d241e55c4cd60e534571fd8e19b69ebadc58a12.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'],