diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2001-01-11 11:51:23 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2001-01-11 11:51:23 +0000 |
commit | a7aa22be13d8705de88445b6ad872fb63da025a8 (patch) | |
tree | 868076a48290090da2c0cfd613fe1d77f87b38d0 /perl-install/install_steps.pm | |
parent | 8501f3c1936799c90ffcf6b58a52f902828d4b92 (diff) | |
download | drakx-backup-do-not-use-a7aa22be13d8705de88445b6ad872fb63da025a8.tar drakx-backup-do-not-use-a7aa22be13d8705de88445b6ad872fb63da025a8.tar.gz drakx-backup-do-not-use-a7aa22be13d8705de88445b6ad872fb63da025a8.tar.bz2 drakx-backup-do-not-use-a7aa22be13d8705de88445b6ad872fb63da025a8.tar.xz drakx-backup-do-not-use-a7aa22be13d8705de88445b6ad872fb63da025a8.zip |
renamef created and used
Diffstat (limited to 'perl-install/install_steps.pm')
-rw-r--r-- | perl-install/install_steps.pm | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index 598cada9c..06137b3cb 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -343,15 +343,13 @@ sub installPackages($$) { #- complete REWORK, TODO and TOCHECK! #- important files and restore them after. foreach (@{$o->{toSave} || []}) { if (-e "$o->{prefix}/$_") { - unlink "$o->{prefix}/$_.mdkgisave"; - eval { commands::cp("$o->{prefix}/$_", "$o->{prefix}/$_.mdkgisave") }; + eval { commands::cp("-f", "$o->{prefix}/$_", "$o->{prefix}/$_.mdkgisave") }; } } pkgs::remove($o->{prefix}, $o->{toRemove}); foreach (@{$o->{toSave} || []}) { if (-e "$o->{prefix}/$_.mdkgisave") { - unlink "$o->{prefix}/$_"; - rename "$o->{prefix}/$_.mdkgisave", "$o->{prefix}/$_"; + renamef("$o->{prefix}/$_.mdkgisave", "$o->{prefix}/$_"); } } $o->{toSave} = []; @@ -480,9 +478,8 @@ GridHeight=70 install_any::kdemove_desktop_file($o->{prefix}); foreach (@filesToSaveForUpgrade) { - if (-e "$o->{prefix}$_.mdkgisave") { - unlink "$o->{prefix}$_.mdkgiorig"; rename "$o->{prefix}/$_.mdkgisave", "$o->{prefix}/$_.mdkgiorig"; - } + renamef("$o->{prefix}/$_.mdkgisave", "$o->{prefix}/$_.mdkgiorig") + if -e "$o->{prefix}$_.mdkgisave"; } } } |