From d009a51b1c5318cb2f9b4a2ab8f6787f7fd7c663 Mon Sep 17 00:00:00 2001 From: mellor Date: Tue, 10 Mar 2015 17:12:50 -0400 Subject: [PATCH] defect 4349: update previous fix to rmkitcomp --- xCAT-server/lib/xcat/plugins/kit.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/kit.pm b/xCAT-server/lib/xcat/plugins/kit.pm index ac1393f31..7f07f9f72 100644 --- a/xCAT-server/lib/xcat/plugins/kit.pm +++ b/xCAT-server/lib/xcat/plugins/kit.pm @@ -2737,7 +2737,7 @@ sub rmkitcomp # Read all the kitcomponents assigned to all the osimage to make sure the repo used by other osimage # will not be deleted. - my @allosikitcomps = $tabs{osimage}->getAllAttribs( 'imagename', 'kitcomponents','otherpkgdir' ); + my @allosikitcomps = $tabs{osimage}->getAllAttribs( 'imagename', 'kitcomponents' ); (my $linuximagetable) = $tabs{linuximage}->getAttribs({imagename=> $osimage}, 'postinstall', 'exlist', 'otherpkglist', 'otherpkgdir', 'driverupdatesrc'); if ( $linuximagetable and $linuximagetable->{otherpkgdir} ) { @@ -2748,13 +2748,13 @@ sub rmkitcomp my %newosikitcomponents; foreach my $allosikitcomp (@allosikitcomps) { if ( $allosikitcomp->{kitcomponents} and $allosikitcomp->{imagename} ) { + (my $allosiotherpkgdir) = $tabs{linuximage}->getAttribs({imagename=> $allosikitcomp->{imagename}}, 'otherpkgdir'); + my @allkitcomps = split /,/, $allosikitcomp->{kitcomponents}; foreach my $allkitcomp ( @allkitcomps ) { if ( (($allosikitcomp->{imagename} ne $osimage) and - ( $allosikitcomp->{otherpkgdir} eq $otherpkgdir )) - or ($allkitcomp ne $kitcomponent) ) { - -} + ($allosiotherpkgdir->{otherpkgdir} eq $otherpkgdir)) + or ($allkitcomp ne $kitcomponent) ) { $newosikitcomponents{$allkitcomp} = 1; } }