From 0f190b79a5181504a0c9ed2b9e2b0bef9eaac11d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=E1=B4=8F=C9=B4=C9=A2=20Jie?= Date: Thu, 16 Aug 2018 19:43:16 +0800 Subject: [PATCH] [go-xcat] Dirty workaround for github issue #5503 on SLES 11 SP4 (#5522) --- xCAT-server/share/xcat/tools/go-xcat | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/xCAT-server/share/xcat/tools/go-xcat b/xCAT-server/share/xcat/tools/go-xcat index 6fe87e9a2..6977dbca4 100755 --- a/xCAT-server/share/xcat/tools/go-xcat +++ b/xCAT-server/share/xcat/tools/go-xcat @@ -2,7 +2,7 @@ # # go-xcat - Install xCAT automatically. # -# Version 1.0.28 +# Version 1.0.29 # # Copyright (C) 2016, 2017, 2018 International Business Machines # Eclipse Public License, Version 1.0 (EPL-1.0) @@ -1320,9 +1320,19 @@ function install_packages_yum() yum --nogpgcheck "${yes[@]}" install "$@" } +# Dirty workaround on SLES 11 SP4 +function github_issue_5503_workaround() +{ + [[ "${GO_XCAT_LINUX_DISTRO}" = "sles" ]] || return 0 + [[ "${GO_XCAT_LINUX_VERSION}" =~ ^11(\.[0-4]){0,1}$ ]] || return 0 + rpm -e --allmatches gpg-pubkey-ca548a47-5b2c830b >/dev/null 2>&1 + return 0 +} + function install_packages_zypper() { type zypper >/dev/null 2>&1 || return 255 + github_issue_5503_workaround local -a yes=() [[ "$1" = "-y" ]] && yes=("-n") && shift zypper --no-gpg-checks "${yes[@]}" install --force-resolution "$@"