Alex Lourie has uploaded a new change for review. Change subject: packaging: setup: only update lang on systems with postgres >9.2 ......................................................................
packaging: setup: only update lang on systems with postgres >9.2 Change-Id: I263526dad0f9adac4d3091b2efb370085415631e Bug-Url: https://bugzilla.redhat.com/1011546 Signed-off-by: Alex Lourie <alou...@redhat.com> --- M packaging/common_utils.py 1 file changed, 20 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-reports refs/changes/93/19993/1 diff --git a/packaging/common_utils.py b/packaging/common_utils.py index 45dc22c..38c2337 100755 --- a/packaging/common_utils.py +++ b/packaging/common_utils.py @@ -847,6 +847,26 @@ def createLang(db_dict, TEMP_PGPASS): cmd = [ + EXEC_PSQL, + '--version' + ] + output, rc = execCmd( + cmdList=cmd, + failOnError=True, + envDict={'ENGINE_PGPASS': TEMP_PGPASS}, + ) + + for line in output.splitlines(): + if 'psql' in line: + version = int(line.split(' ')[2].replace('.', '')) + if version >= 92: + logging.debug( + 'PSQL version is higher than 9.2, ' + 'no need to createlang' + ) + return + + cmd = [ '/usr/bin/createlang', '--host=%s' % db_dict['host'], '--port=%s' % db_dict['port'], -- To view, visit http://gerrit.ovirt.org/19993 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I263526dad0f9adac4d3091b2efb370085415631e Gerrit-PatchSet: 1 Gerrit-Project: ovirt-reports Gerrit-Branch: master Gerrit-Owner: Alex Lourie <alou...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches