From 907f384f6511a64ec0e6c8bdd3d9578c529f6290 Mon Sep 17 00:00:00 2001 From: GONG Jie Date: Tue, 8 Nov 2016 15:12:14 +0800 Subject: [PATCH 1/3] [go-xcat] More error messages when yum failed --- xCAT-server/share/xcat/tools/go-xcat | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xCAT-server/share/xcat/tools/go-xcat b/xCAT-server/share/xcat/tools/go-xcat index fc2449872..6b34f2ee8 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.10 +# Version 1.0.11 # # Copyright (C) 2016 International Business Machines # Eclipse Public License, Version 1.0 (EPL-1.0) @@ -923,8 +923,8 @@ function remove_repo_yum() # This deleting method is not good enough. Since there could be more # than one repostory definitions in a single repo file. # This is a quick and dirty method. - rm -f $(grep -l "^\[${repo_id}\]$" "/etc/yum.repos.d/"*".repo") - yum clean metadata >/dev/null 2>&1 + rm -f $(grep -l "^\[${repo_id}\]$" "/etc/yum.repos.d/"*".repo" 2>/dev/null) + yum clean metadata } # $1 repo id From ef6eeb5ff8b16063d8a8d64234e00292541bd367 Mon Sep 17 00:00:00 2001 From: GONG Jie Date: Wed, 16 Nov 2016 14:46:17 +0800 Subject: [PATCH 2/3] [go-xcat] Ask the end user to use at least yum version 3.2.29-17 --- xCAT-server/share/xcat/tools/go-xcat | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xCAT-server/share/xcat/tools/go-xcat b/xCAT-server/share/xcat/tools/go-xcat index 6b34f2ee8..30a57c24c 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.11 +# Version 1.0.12 # # Copyright (C) 2016 International Business Machines # Eclipse Public License, Version 1.0 (EPL-1.0) @@ -1106,7 +1106,8 @@ function update_repo_yum() # Check if `yum' support `updateinfo' command. yum --help 2>/dev/null | grep -q "^updateinfo" >/dev/null 2>&1 warn_if_bad "$?" "Lacking support of \`updateinfo' command for \`yum'." - exit_if_bad "$?" "Install the \`yum-plugin-security' package and rerun." + warn_if_bad "$?" "Please rerun after install package \`yum-plugin-security'." + exit_if_bad "$?" "And please update package \`yum' to at least version 3.2.29-17." yum --nogpgcheck updateinfo } From 429dc7867b9d65ccf0cf38893feb1168e15bf16a Mon Sep 17 00:00:00 2001 From: GONG Jie Date: Wed, 16 Nov 2016 15:37:38 +0800 Subject: [PATCH 3/3] [go-xcat] Run zypper in non-interactive mode when run `zypper refresh' --- xCAT-server/share/xcat/tools/go-xcat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-server/share/xcat/tools/go-xcat b/xCAT-server/share/xcat/tools/go-xcat index 30a57c24c..efa921180 100755 --- a/xCAT-server/share/xcat/tools/go-xcat +++ b/xCAT-server/share/xcat/tools/go-xcat @@ -1114,7 +1114,7 @@ function update_repo_yum() function update_repo_zypper() { type zypper >/dev/null 2>&1 || return 255 - zypper --gpg-auto-import-keys refresh + zypper --gpg-auto-import-keys -n refresh } function update_repo_apt()