diff --git a/xCAT-buildkit/bin/buildkit b/xCAT-buildkit/bin/buildkit index 2c4d2e374..02ca942cb 100755 --- a/xCAT-buildkit/bin/buildkit +++ b/xCAT-buildkit/bin/buildkit @@ -1915,6 +1915,8 @@ sub build_kitcomp # specifically reference it's version-release if ( &update_kitcomp_kitpkgdeps($comp,$repodir) ) { return 1; } + $::VALID_PRER_COMPONENT = 0; + if ( !$::PREREQUISITE ) { if ( $comp->{ospkgdeps} || $comp->{preinstall} || $comp->{preupgrade} || $comp->{preuninstall} ) { if ( &gen_kitcomp_spec($comp,\%repo, 'PREREQUISITE') ) { return 1; } @@ -1954,6 +1956,8 @@ sub build_kitcomp } } + $::VALID_PRER_COMPONENT = 1; + } if ( &gen_kitcomp_spec($comp,\%repo, 'METARPM') ) { return 1; } @@ -2271,7 +2275,12 @@ sub gen_kitcomp_spec s/<<>>/$::bldkit_config->{kit}{entries}[0]->{url}/; s/<<>>//; s/<<>>/$comp->{kitpkgdeps}/; - s/<<>>/$comp->{kitcompdeps}/; + #Update kitcompdeps for prep_ + if ( $::VALID_PRER_COMPONENT ) { + s/<<>>/$comp->{kitcompdeps},prep_$comp->{basename}/; + } else { + s/<<>>/$comp->{kitcompdeps}/; + } s/<<>>/$comp->{description}/; s/<<>>/$nonnativepkgs/; s/<<>>/$sourcetar/;