fix #3877 [FVT]genimage return confusing error message when xCAT-IBMhpc is not installed
This commit is contained in:
parent
e2708df2b4
commit
43bc2d1e8e
@ -218,6 +218,10 @@ unless ($onlyinitrd) {
|
||||
foreach $pass (sort (keys(%pkg_hash))) {
|
||||
my $pkgnames = "";
|
||||
foreach (keys(%{$pkg_hash{$pass}})) {
|
||||
if($_ eq "INCLUDEBAD") {
|
||||
print "Unable to open the following pkglist files:\n".join("\n",@{$pkg_hash{$pass}{INCLUDEBAD}});
|
||||
exit 1;
|
||||
}
|
||||
if (($_ eq "PRE_REMOVE") || ($_ eq "POST_REMOVE")) { next;}
|
||||
my $pa=$pkg_hash{$pass}{$_};
|
||||
$pkgnames .= " " . join(' ', @$pa);
|
||||
@ -248,6 +252,12 @@ unless ($onlyinitrd) {
|
||||
my $index=1;
|
||||
foreach $pass (sort (keys(%extra_hash))) {
|
||||
foreach (keys(%{$extra_hash{$pass}})) {
|
||||
|
||||
if($_ eq "INCLUDEBAD") {
|
||||
print "Unable to open the following pkglist files:\n".join("\n",@{$extra_hash{$pass}{INCLUDEBAD}});
|
||||
exit 1;
|
||||
}
|
||||
|
||||
if (($_ eq "PRE_REMOVE") || ($_ eq "POST_REMOVE")) { next;}
|
||||
print $yumconfig "[otherpkgs$index]\nname=otherpkgs$index\nbaseurl=file://$srcdir_otherpkgs/$_\ngpgpcheck=0\n\n";
|
||||
$index++;
|
||||
|
@ -117,7 +117,7 @@ sub get_package_names {
|
||||
}
|
||||
}
|
||||
|
||||
#print "pkgtext=$pkgtext\n";
|
||||
#print "\n\npkgtext=$pkgtext\n\n";
|
||||
my @tmp=split(',', $pkgtext);
|
||||
my $pass=1;
|
||||
foreach (@tmp) {
|
||||
@ -140,6 +140,15 @@ sub get_package_names {
|
||||
$pkgnames{$pass}{ENVLIST} = [$env];
|
||||
}
|
||||
next;
|
||||
} elsif (/^#INCLUDEBAD:([^#^\n]+)#/){
|
||||
my $pa=$pkgnames{$pass}{INCLUDEBAD};
|
||||
my $file=$1;
|
||||
if (exists($pkgnames{$pass}{INCLUDEBAD})){
|
||||
push(@$pa,$file);
|
||||
} else {
|
||||
$pkgnames{$pass}{INCLUDEBAD} =[$file];
|
||||
}
|
||||
next;
|
||||
} elsif (/^#/) {
|
||||
# ignore all other comment lines
|
||||
next;
|
||||
|
@ -120,6 +120,12 @@ if ($otherpkglist) {
|
||||
my $pass;
|
||||
foreach $pass (sort {$a <=> $b} (keys(%extra_hash))) {
|
||||
foreach (keys(%{$extra_hash{$pass}})) {
|
||||
|
||||
if($_ eq "INCLUDEBAD") {
|
||||
print "Unable to open the following pkglist files:\n".join("\n",@{$extra_hash{$pass}{INCLUDEBAD}});
|
||||
exit 1;
|
||||
}
|
||||
|
||||
if (($_ eq "PRE_REMOVE") || ($_ eq "POST_REMOVE") || ($_ eq "ENVLIST")) { next;}
|
||||
print $yumconfig "[otherpkgs$index]\nname=otherpkgs$index\nbaseurl=file://$srcdir_otherpkgs/$_\ngpgpcheck=0\n\n";
|
||||
$repohash{$pass}{$index} = 1;
|
||||
|
@ -276,11 +276,17 @@ unless ($onlyinitrd) {
|
||||
}
|
||||
|
||||
my %pkg_hash=imgutils::get_package_names($pkglist);
|
||||
|
||||
my $index=1;
|
||||
my $pass;
|
||||
foreach $pass (sort {$a <=> $b} (keys(%pkg_hash))) {
|
||||
my $pkgnames = "";
|
||||
foreach (keys(%{$pkg_hash{$pass}})) {
|
||||
if($_ eq "INCLUDEBAD") {
|
||||
print "Unable to open the following pkglist files:\n".join("\n",@{$pkg_hash{$pass}{INCLUDEBAD}});
|
||||
exit 1;
|
||||
}
|
||||
|
||||
if (($_ eq "PRE_REMOVE") || ($_ eq "POST_REMOVE") || ($_ eq "ENVLIST")) { next;}
|
||||
my $pa=$pkg_hash{$pass}{$_};
|
||||
my @npa = ();
|
||||
@ -350,6 +356,12 @@ unless ($onlyinitrd) {
|
||||
my $index=1;
|
||||
foreach $pass (sort {$a <=> $b} (keys(%extra_hash))) {
|
||||
foreach (keys(%{$extra_hash{$pass}})) {
|
||||
|
||||
if($_ eq "INCLUDEBAD") {
|
||||
print "Unable to open the following pkglist files:\n".join("\n",@{$extra_hash{$pass}{INCLUDEBAD}});
|
||||
exit 1;
|
||||
}
|
||||
|
||||
if (($_ eq "PRE_REMOVE") || ($_ eq "POST_REMOVE") || ($_ eq "ENVLIST")) { next;}
|
||||
print $yumconfig "[otherpkgs$index]\nname=otherpkgs$index\nbaseurl=file://$srcdir_otherpkgs/$_\ngpgpcheck=0\n\n";
|
||||
$repohash{$pass}{$index} = 1;
|
||||
|
@ -316,6 +316,12 @@ unless ($onlyinitrd) {
|
||||
my $pass;
|
||||
foreach $pass (sort {$a <=> $b} (keys(%extra_hash))) {
|
||||
foreach (keys(%{$extra_hash{$pass}})) {
|
||||
|
||||
if($_ eq "INCLUDEBAD") {
|
||||
print "Unable to open the following pkglist files:\n".join("\n",@{$extra_hash{$pass}{INCLUDEBAD}});
|
||||
exit 1;
|
||||
}
|
||||
|
||||
if (($_ eq "PRE_REMOVE") || ($_ eq "POST_REMOVE") || ($_ eq "ENVLIST")) { next;}
|
||||
my $whole_path="$srcdir_otherpkgs/$_";
|
||||
if (-r "$srcdir_otherpkgs/$_/repodata/repomd.xml") {
|
||||
@ -395,6 +401,12 @@ unless ($onlyinitrd) {
|
||||
$pkgnames = "";
|
||||
$group_pkgnames = "";
|
||||
foreach (keys(%{$pkg_hash{$pass}})) {
|
||||
|
||||
if($_ eq "INCLUDEBAD") {
|
||||
print "Unable to open the following pkglist files:\n".join("\n",@{$pkg_hash{$pass}{INCLUDEBAD}});
|
||||
exit 1;
|
||||
}
|
||||
|
||||
if (($_ eq "PRE_REMOVE") || ($_ eq "POST_REMOVE") || ($_ eq "ENVLIST")) { next;}
|
||||
my $pa=$pkg_hash{$pass}{$_};
|
||||
# replace the kernel package with the name has the specific version
|
||||
|
@ -266,6 +266,11 @@ unless ($onlyinitrd) {
|
||||
foreach $pass (sort {$a <=> $b} (keys(%pkg_hash))) {
|
||||
my $pkgnames = "";
|
||||
foreach (keys(%{$pkg_hash{$pass}})) {
|
||||
if($_ eq "INCLUDEBAD") {
|
||||
print "Unable to open the following pkglist files:\n".join("\n",@{$pkg_hash{$pass}{INCLUDEBAD}});
|
||||
exit 1;
|
||||
}
|
||||
|
||||
if (($_ eq "PRE_REMOVE") || ($_ eq "POST_REMOVE") || ($_ eq "ENVLIST")) { next;}
|
||||
my $pa=$pkg_hash{$pass}{$_};
|
||||
my @npa = ();
|
||||
@ -357,6 +362,11 @@ unless ($onlyinitrd) {
|
||||
my $index=1;
|
||||
foreach $pass (sort {$a <=> $b} (keys(%extra_hash))) {
|
||||
foreach (keys(%{$extra_hash{$pass}})) {
|
||||
if($_ eq "INCLUDEBAD") {
|
||||
print "Unable to open the following pkglist files:\n".join("\n",@{$extra_hash{$pass}{INCLUDEBAD}});
|
||||
exit 1;
|
||||
}
|
||||
|
||||
if (($_ eq "PRE_REMOVE") || ($_ eq "POST_REMOVE") || ($_ eq "ENVLIST")) { next;}
|
||||
$index++;
|
||||
my $pa=$extra_hash{$pass}{$_};
|
||||
|
Loading…
Reference in New Issue
Block a user