2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-08-15 07:40:28 +00:00

Merge pull request #2792 from neo954/go-xcat-devel

[go-xcat] Ignore any error of `yum clean metadata`
This commit is contained in:
Weihua Hu
2017-04-17 10:29:38 +08:00
committed by GitHub

View File

@@ -2,7 +2,7 @@
#
# go-xcat - Install xCAT automatically.
#
# Version 1.0.15
# Version 1.0.17
#
# Copyright (C) 2016 International Business Machines
# Eclipse Public License, Version 1.0 (EPL-1.0)
@@ -517,7 +517,7 @@ function check_repo_version_zypper()
do
name+=("${name}")
ver+=("${ver}")
done < <(zypper --no-gpg-checks -n search -s --match-exact "$@" \
done < <(zypper --no-gpg-checks -n search -u -s --match-exact "$@" \
2>/dev/null | awk -F ' *\\| *' '/ package / { print $2, $4 }')
local -i i
while [[ -n "$1" ]]
@@ -955,6 +955,7 @@ function remove_repo_yum()
# This is a quick and dirty method.
rm -f $(grep -l "^\[${repo_id}\]$" "/etc/yum.repos.d/"*".repo" 2>/dev/null)
yum clean metadata
:
}
# $1 repo id