From 975abca7b022052ff8bee76f1eca8a26c572bccc Mon Sep 17 00:00:00 2001 From: linggao Date: Wed, 3 Oct 2012 12:56:10 +0000 Subject: [PATCH] defect fix for otherpkgs not able to pick up the newly added repositories. Also removed the auto upgrade because it wipes out the change for Mellanox rpms. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13936 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT/postscripts/otherpkgs | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/xCAT/postscripts/otherpkgs b/xCAT/postscripts/otherpkgs index 0a16f2361..403340328 100755 --- a/xCAT/postscripts/otherpkgs +++ b/xCAT/postscripts/otherpkgs @@ -409,6 +409,12 @@ while [ $op_index -le $OTHERPKGS_INDEX ]; do fi echo "enabled=1" >> $REPOFILE echo "gpgcheck=0" >> $REPOFILE + if [ $hasyum -eq 1 ]; then + yum clean all + fi + if [ $haszypper -eq 1 ]; then + zypper --non-interactive refresh + fi elif [ $hasapt -eq 1 ] ; then REPOFILE="$repo_base/xCAT-otherpkgs$index.list" @@ -471,13 +477,14 @@ while [ $op_index -le $OTHERPKGS_INDEX ]; do #now update all the existing rpms if [ $hasyum -eq 1 ]; then - echo "yum -y upgrade" - result=`yum -y upgrade 2>&1` - logger -p local4.info -t xcat "$result" - if [ $? -ne 0 ]; then - logger -p local4.info -t xcat "otherpkgs: $result" - fi - echo "$result" + #echo "yum -y upgrade" + #result=`yum -y upgrade 2>&1` + #logger -p local4.info -t xcat "$result" + #if [ $? -ne 0 ]; then + #logger -p local4.info -t xcat "otherpkgs: $result" + #fi + #echo "$result" + echo "result" elif [ $haszypper -eq 1 ]; then echo "zypper --non-interactive update --auto-agree-with-license" result=`zypper --non-interactive update --auto-agree-with-license 2>&1`