fixing bug 3505826: don't run yum install command if otherpkg list only contains marked removable pkg and no package to install

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11879 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
wanghuaz 2012-03-16 07:05:26 +00:00
parent 42e3641b01
commit f8138b1687

View File

@ -339,19 +339,21 @@ unless ($onlyinitrd) {
# append extra pkg names to yum command
if ($extrapkgnames{$pass}) {
$yumcmd .= " $extrapkgnames{$pass} ";
}
$yumcmd =~ s/ $/\n/;
$yumcmd =~ s/ $/\n/;
# debug
#print "yumcmd=$yumcmd\n";
#my $repo=`cat /tmp/genimage.$$.yum.conf`;
#print "repo=$repo";
print "$envlist $yumcmd\n";
my $rc = system("$envlist $yumcmd");
if ($rc) {
print "yum invocation failed\n";
exit 1;
# debug
#print "yumcmd=$yumcmd\n";
#my $repo=`cat /tmp/genimage.$$.yum.conf`;
#print "repo=$repo";
print "$envlist $yumcmd\n";
my $rc = system("$envlist $yumcmd");
if ($rc) {
print "yum invocation failed\n";
exit 1;
}
} else {
print "No Packages marked for install\n";
}
# remove the packages that are specified in the otherpkgs.list files with leading '--'