Alon Bar-Lev has uploaded a new change for review. Change subject: packagers: yum: support disbale/enable plugins ......................................................................
packagers: yum: support disbale/enable plugins Change-Id: Ieccd4bce0fd2b33d91666b1c2bfe68662a096838 Signed-off-by: Alon Bar-Lev <[email protected]> --- M src/otopi/constants.py M src/plugins/otopi/packagers/miniyumlocal.py M src/plugins/otopi/packagers/yumpackager.py 3 files changed, 23 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/otopi refs/changes/08/15108/1 diff --git a/src/otopi/constants.py b/src/otopi/constants.py index abaa0b2..d921fd6 100644 --- a/src/otopi/constants.py +++ b/src/otopi/constants.py @@ -157,6 +157,8 @@ class PackEnv(object): YUMPACKAGER_ENABLED = 'PACKAGER/yumpackagerEnabled' KEEP_ALIVE_INTERVAL = 'PACKAGER/keepAliveInterval' + YUM_DISABLED_PLUGINS = 'PACKAGER/yumDisabledPlugins' + YUM_ENABLED_PLUGINS = 'PACKAGER/yumEnabledPlugins' @util.export diff --git a/src/plugins/otopi/packagers/miniyumlocal.py b/src/plugins/otopi/packagers/miniyumlocal.py index 845efa5..d554598 100644 --- a/src/plugins/otopi/packagers/miniyumlocal.py +++ b/src/plugins/otopi/packagers/miniyumlocal.py @@ -83,11 +83,17 @@ @util.export -def getMiniYum(parent): +def getMiniYum( + parent, + disabledPlugins=[], + enabledPlugins=[] +): """Get miniyum objects at separate source to ease making it optional.""" return miniyum.MiniYum( sink=_MyMiniYumSink(parent=parent), blockStdHandles=False, + disabledPlugins=disabledPlugins, + enabledPlugins=enabledPlugins, ) diff --git a/src/plugins/otopi/packagers/yumpackager.py b/src/plugins/otopi/packagers/yumpackager.py index 07ad977..87c783a 100644 --- a/src/plugins/otopi/packagers/yumpackager.py +++ b/src/plugins/otopi/packagers/yumpackager.py @@ -71,6 +71,14 @@ def _boot(self): try: self.environment.setdefault( + constants.PackEnv.YUM_DISABLED_PLUGINS, + [] + ) + self.environment.setdefault( + constants.PackEnv.YUM_ENABLED_PLUGINS, + [] + ) + self.environment.setdefault( constants.PackEnv.KEEP_ALIVE_INTERVAL, constants.Defaults.PACKAGER_KEEP_ALIVE_INTERVAL ) @@ -78,6 +86,12 @@ from . import miniyumlocal self._miniyum = miniyumlocal.getMiniYum( parent=self, + disabledPlugins=self.environment[ + constants.PackEnv.YUM_DISABLED_PLUGINS + ], + enabledPlugins=self.environment[ + constants.PackEnv.YUM_ENABLED_PLUGINS + ], ) # the following will trigger the NOTIFY_REEXEC -- To view, visit http://gerrit.ovirt.org/15108 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ieccd4bce0fd2b33d91666b1c2bfe68662a096838 Gerrit-PatchSet: 1 Gerrit-Project: otopi Gerrit-Branch: master Gerrit-Owner: Alon Bar-Lev <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
