From 551a2ac1d1e7c70090a236747f65aa0db464a9cf Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Tue, 12 Mar 2013 03:30:04 +0100 Subject: 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. --- src/lib/Bcfg2/Server/Plugins/Packages/Portage.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/lib/Bcfg2/Server/Plugins/Packages/Portage.py') 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'], -- cgit v1.2.3-1-g7c22