From 1934b3123c81c2ccb425626aa61ed29e38780ddf Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Wed, 8 Dec 1999 18:58:45 +0000 Subject: *** empty log message *** --- perl-install/install_steps.pm | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'perl-install/install_steps.pm') diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index 56f8c9064..c650032dc 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -211,15 +211,21 @@ sub installPackages($$) { my ($o, $packages) = @_; if (@{$o->{toRemove} || []}) { - my @mdkgisave = qw( /etc/passwd ); - #- hack to ensure proper upgrade of packages from other distribution, - #- as release number are not mandrake based. this causes save of very - #- important files (not all) and restore them after. - #- it is not enough to dop only that. - do { unlink "$o->{prefix}/$_.mdkgisave"; rename "$o->{prefix}/$_", "$o->{prefix}/$_.mdkgisave"; } foreach @mdkgisave; + #- as release number are not mandrake based. this causes save of + #- important files and restore them after. + foreach (@{$o->{toSave} || []}) { + if (-e "$o->{prefix}/$_") { + unlink "$o->{prefix}/$_.mdkgisave"; rename "$o->{prefix}/$_", "$o->{prefix}/$_.mdkgisave"; + } + } pkgs::remove($o->{prefix}, $o->{toRemove}); - do { unlink "$o->{prefix}/$_"; rename "$o->{prefix}/$_.mdkgisave", "$o->{prefix}/$_"; } foreach @mdkgisave; + foreach (@{$o->{toSave} || []}) { + if (-e "$o->{prefix}/$_.mdkgisave") { + unlink "$o->{prefix}/$_"; rename "$o->{prefix}/$_.mdkgisave", "$o->{prefix}/$_"; + } + } + $o->{toSave} = []; } #- hack to ensure proper ordering for installation of packages. @@ -574,7 +580,7 @@ sub setupXfreeAfter { Xconfigurator::rewriteInittab(3) unless $::testing; #- disable automatic start-up of X11 on error. } } - if ($o->{X}{card}{default_depth} >= 16 || $o->{X}{card}{default_wres} >= 1024) { + if ($o->{X}{card}{default_depth} >= 16 && $o->{X}{card}{default_wres} >= 1024) { log::l("setting large icon style for kde"); install_any::kderc_largedisplay($o->{prefix}); } -- cgit v1.2.1