From 9942cc3b092d226fdbb21e9c2a31693ef11672fb Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Aug 08 2017 16:27:48 +0000 Subject: On dist-git we only need to compile gitolite's config file So let's do just that instead of compile then trigger POST_COMPILE as done on pagure.io Signed-off-by: Pierre-Yves Chibon --- diff --git a/dist_git_auth.py b/dist_git_auth.py index 33bd55d..f93fec3 100644 --- a/dist_git_auth.py +++ b/dist_git_auth.py @@ -65,6 +65,18 @@ def get_supported_branches(namespace, package): class DistGitoliteAuth(Gitolite3Auth): """ A dist-git's gitolite authentication module. """ + @staticmethod + def _get_gitolite_command(): + """ Return the gitolite command to run based on the info in the + configuration file. + """ + _log.info('Compiling the gitolite configuration') + gitolite_folder = pagure.APP.config.get('GITOLITE_HOME', None) + if gitolite_folder: + cmd = 'HOME=%s gitolite compile' % (gitolite_folder) + _log.debug('Command: %s', cmd) + return cmd + @classmethod def _process_project(cls, project, config, global_pr_only): """ Generate the gitolite configuration for the specified project.