2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-22 11:42:05 +00:00

[go-xcat] Dirty workaround for github issue #5503 on SLES 11 SP4 (#5522)

This commit is contained in:
Gᴏɴɢ Jie 2018-08-16 19:43:16 +08:00 committed by Bin Xu
parent 5164086ffb
commit 0f190b79a5

View File

@ -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 "$@"