fixing bug 3848, moving preuninstall script from prerequisite rpm to meta rpm to make sure it can be issued before componnet been uninstalled.

This commit is contained in:
wanghuaz 2013-12-26 15:09:52 +08:00
parent 921d251301
commit a2aee1a0bb

View File

@ -2169,10 +2169,10 @@ sub gen_kitcomp_spec
if (defined($comp->{preupgrade})) {
$preupscript = &load_script("$scriptdir$comp->{preupgrade}");
$preupscript = "if [ \"\$1\" = \"2\" ] ; then\n" . $preupscript . "\nfi";}
if (defined($comp->{preuninstall})) {
$preunscript = &load_script("$scriptdir$comp->{preuninstall}"); }
}
if ( $level eq 'METARPM' || $level eq 'ALL' ) {
if (defined($comp->{preuninstall})) {
$preunscript = &load_script("$scriptdir$comp->{preuninstall}"); }
if (defined($comp->{postinstall})) {
$postscript = &load_script("$scriptdir$comp->{postinstall}");
$postscript = "if [ \"\$1\" = \"1\" ] ; then\n" . $postscript . "\nfi"; }