From 322a84494eba3b4f7e97fb8afd85d6e33bec57b2 Mon Sep 17 00:00:00 2001 From: wanghuaz Date: Thu, 24 Oct 2013 14:50:51 +0800 Subject: [PATCH] fixing bug 3848: add prerequisite component as dependency of kit component meta rpm --- xCAT-buildkit/bin/buildkit | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/xCAT-buildkit/bin/buildkit b/xCAT-buildkit/bin/buildkit index b105451ae..33817ad07 100755 --- a/xCAT-buildkit/bin/buildkit +++ b/xCAT-buildkit/bin/buildkit @@ -1920,6 +1920,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; } @@ -1959,6 +1961,8 @@ sub build_kitcomp } } + $::VALID_PRER_COMPONENT = 1; + } if ( &gen_kitcomp_spec($comp,\%repo, 'METARPM') ) { return 1; } @@ -2246,7 +2250,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/;