diff --git a/xCAT-client/pods/man1/addkitcomp.1.pod b/xCAT-client/pods/man1/addkitcomp.1.pod index cff400964..821d403fd 100644 --- a/xCAT-client/pods/man1/addkitcomp.1.pod +++ b/xCAT-client/pods/man1/addkitcomp.1.pod @@ -15,9 +15,9 @@ The B 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. diff --git a/xCAT-server/share/xcat/netboot/rh/genimage b/xCAT-server/share/xcat/netboot/rh/genimage index d99271dd1..6b75afe34 100755 --- a/xCAT-server/share/xcat/netboot/rh/genimage +++ b/xCAT-server/share/xcat/netboot/rh/genimage @@ -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' diff --git a/xCAT-server/share/xcat/netboot/sles/genimage b/xCAT-server/share/xcat/netboot/sles/genimage index d22bf48eb..aa3eda6d6 100755 --- a/xCAT-server/share/xcat/netboot/sles/genimage +++ b/xCAT-server/share/xcat/netboot/sles/genimage @@ -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'