Alon Bar-Lev has uploaded a new change for review. Change subject: packagers: yum: support the async URLGrabber ......................................................................
packagers: yum: support the async URLGrabber yum uses python-urlgrabber to grab files, but does not allow setting the meter for parallel fetch. The detection if parallel fetch is to be used is not configurable, so we hack a private member to force blocking download. The progress callback broke because of python-urlgrabber or yum change, hopping this modification will be sufficient to avoid future behaviour breakage. Change-Id: I41557b1ed5f44d685e5305909b3914e2fcf4ce0a Signed-off-by: Alon Bar-Lev <[email protected]> --- M src/plugins/otopi/packagers/miniyum.py 1 file changed, 14 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/otopi refs/changes/94/10694/1 diff --git a/src/plugins/otopi/packagers/miniyum.py b/src/plugins/otopi/packagers/miniyum.py index f0c045d..dc812b9 100755 --- a/src/plugins/otopi/packagers/miniyum.py +++ b/src/plugins/otopi/packagers/miniyum.py @@ -463,6 +463,20 @@ with self._disableOutput: self._yb = self._YumBase(self._sink) + # + # DO NOT use async which is the + # hardcoded default as we will not + # be able to monitor progress + # + from urlgrabber import grabber + if hasattr(grabber, 'parallel_wait'): + for repo in self._yb.repos.listEnabled(): + repo._async = False + + # + # Set progress bar hook, useless if + # async/parallel is enabled. + # self._yb.repos.setProgressBar( self._DownloadCallback(self._sink) ) -- To view, visit http://gerrit.ovirt.org/10694 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I41557b1ed5f44d685e5305909b3914e2fcf4ce0a 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
