fixing bug 3510 remove useless repos after genimage
This commit is contained in:
parent
6375fb72ad
commit
3aca3b2a70
@ -15,9 +15,9 @@ The B<addkitcomp> command will assign kit components to an xCAT osimage. The kit
|
||||
Note: The xCAT support for Kits is only available for Linux operating systems.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
=over 10
|
||||
|
||||
=over 10
|
||||
|
||||
=item B<-a|--adddeps>
|
||||
|
||||
Assign kitcomponent dependencies to the osimage.
|
||||
|
@ -408,13 +408,15 @@ unless ($onlyinitrd) {
|
||||
}
|
||||
}
|
||||
$yumcmd = $yumcmd_base;
|
||||
|
||||
# run yum update to update any installed rpms
|
||||
# needed when running genimage again after updating software in repositories
|
||||
my $yumcmd_update = $yumcmd_base . " update ";
|
||||
$rc = system("$yumcmd_update");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
# run yum update to update any installed rpms
|
||||
# needed when running genimage again after updating software in repositories
|
||||
my $yumcmd_update = $yumcmd_base . " update ";
|
||||
$rc = system("$yumcmd_update");
|
||||
# ignore any return code
|
||||
|
||||
postscripts(); #run 'postscripts'
|
||||
|
@ -544,17 +544,31 @@ unless ($onlyinitrd) {
|
||||
$rc = system("$envlist $yumcmd_remove $rm_packges");
|
||||
}
|
||||
}
|
||||
|
||||
# run zypper update to update any installed rpms
|
||||
# needed when running genimage again after updating software in repositories
|
||||
my $yumcmd_update;
|
||||
if ($osver_host == 11) {
|
||||
$yumcmd_update = "zypper -R $rootimg_dir $non_interactive update ";
|
||||
} else {
|
||||
$yumcmd_update = "zypper -R $rootimg_dir $non_interactive update ";
|
||||
}
|
||||
$rc = system("$yumcmd_update");
|
||||
}
|
||||
|
||||
# run zypper update to update any installed rpms
|
||||
# needed when running genimage again after updating software in repositories
|
||||
my $yumcmd_update;
|
||||
#remove the old repository for extra packages
|
||||
if ($osver_host == 11) {
|
||||
$yumcmd_update = "zypper -R $rootimg_dir $non_interactive update ";
|
||||
my $result=`zypper -R $rootimg_dir $non_interactive lr |grep otherpkg|cut -f2 -d '|'|tr "\n" " "`;
|
||||
if ($result =~ /\S/) {
|
||||
system("zypper -R $rootimg_dir $non_interactive rr $result");
|
||||
}
|
||||
} else {
|
||||
$yumcmd_update = "zypper -R $rootimg_dir $non_interactive update ";
|
||||
my $result=`zypper -R $rootimg_dir $non_interactive sl |grep otherpkg|cut -f2 -d '|'|tr "\n" " "`;
|
||||
if ($result =~ /\S/) {
|
||||
system("zypper -R $rootimg_dir $non_interactive sd $result");
|
||||
}
|
||||
}
|
||||
$rc = system("$yumcmd_update");
|
||||
|
||||
# ignore any return code
|
||||
|
||||
postscripts(); #run 'postscripts'
|
||||
|
Loading…
Reference in New Issue
Block a user