diff options
author | Francois Pons <fpons@mandriva.com> | 2002-03-05 17:04:47 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2002-03-05 17:04:47 +0000 |
commit | 27bd7dbc989acdc6456b4a0b94d0fde5db138610 (patch) | |
tree | 09b24aeb182dae4c2bd802bce0974fa719c69a08 | |
parent | faf8d9bf045649c0155eee71cafd362bd5ec1fcf (diff) | |
download | drakx-backup-do-not-use-27bd7dbc989acdc6456b4a0b94d0fde5db138610.tar drakx-backup-do-not-use-27bd7dbc989acdc6456b4a0b94d0fde5db138610.tar.gz drakx-backup-do-not-use-27bd7dbc989acdc6456b4a0b94d0fde5db138610.tar.bz2 drakx-backup-do-not-use-27bd7dbc989acdc6456b4a0b94d0fde5db138610.tar.xz drakx-backup-do-not-use-27bd7dbc989acdc6456b4a0b94d0fde5db138610.zip |
added auto restore of some files (/etc/profile) needed by upgrade (from .rpmnew).
-rw-r--r-- | perl-install/install_steps.pm | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index 3864f8a06..e132b8f8c 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -2,7 +2,7 @@ package install_steps; # $Id$ use diagnostics; use strict; -use vars qw(@filesToSaveForUpgrade @ISA); +use vars qw(@filesToSaveForUpgrade @filesNewerToUseAfterUpgrade @ISA); #-###################################################################################### #- misc imports @@ -26,6 +26,9 @@ use fs; /etc/ld.so.conf /etc/fstab /etc/hosts /etc/conf.modules /etc/modules.conf ); +@filesNewerToUseAfterUpgrade = qw( +/etc/profile +); #-###################################################################################### #- OO Stuff @@ -287,6 +290,9 @@ sub beforeInstallPackages { eval { cp_af("$o->{prefix}/$_", "$o->{prefix}/$_.mdkgisave") }; } } + foreach (@filesNewerToUseAfterUpgrade) { + unlink "$o->{prefix}/$_.rpmnew"; + } } #- some packages need such files for proper installation. @@ -491,6 +497,13 @@ GridHeight=70 renamef("$o->{prefix}/$_.mdkgisave", "$o->{prefix}/$_.mdkgiorig") if -e "$o->{prefix}$_.mdkgisave"; } + + foreach (@filesNewerToUseAfterUpgrade) { + if (-e "$o->{prefix}/$_.rpmnew" && -e "$o->{prefix}/$_") { + renamef("$o->{prefix}/$_", "$o->{prefix}/$_.mdkgiorig"); + renamef("$o->{prefix}/$_.rpmnew", "$o->{prefix}/$_"); + } + } } if ($o->{blank} || $o->{updatemodules}) { |