fixing bug 3505826: don't run yum install command if otherpkg list only contains marked removable pkg and no package marked to install. Same change in trunk revision: 11879

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@11905 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
wanghuaz 2012-03-20 06:36:34 +00:00
parent 31ca57bcfe
commit 1868e85c57

View File

@ -339,19 +339,21 @@ unless ($onlyinitrd) {
# append extra pkg names to yum command
if ($extrapkgnames{$pass}) {
$yumcmd .= " $extrapkgnames{$pass} ";
}
$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;
$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;
}
} else {
print "No Packages marked for install\n";
}
# remove the packages that are specified in the otherpkgs.list files with leading '--'