diff options
author | Francois Pons <fpons@mandriva.com> | 2000-01-06 11:23:39 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2000-01-06 11:23:39 +0000 |
commit | 1aa830a04246a89a305be3ca3b8b2615c1d88065 (patch) | |
tree | bee63f704d59092c933a62383ac3770439dfa515 | |
parent | 196c5ec6d2417109b37088d98c8e6177d6f90909 (diff) | |
download | drakx-backup-do-not-use-1aa830a04246a89a305be3ca3b8b2615c1d88065.tar drakx-backup-do-not-use-1aa830a04246a89a305be3ca3b8b2615c1d88065.tar.gz drakx-backup-do-not-use-1aa830a04246a89a305be3ca3b8b2615c1d88065.tar.bz2 drakx-backup-do-not-use-1aa830a04246a89a305be3ca3b8b2615c1d88065.tar.xz drakx-backup-do-not-use-1aa830a04246a89a305be3ca3b8b2615c1d88065.zip |
*** empty log message ***
-rw-r--r-- | perl-install/install_any.pm | 12 | ||||
-rw-r--r-- | perl-install/install_steps.pm | 2 | ||||
-rw-r--r-- | perl-install/pkgs.pm | 10 |
3 files changed, 13 insertions, 11 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index 6403ebf7a..ccc8343f1 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -663,22 +663,24 @@ sub kdeicons_postinstall($) { sub move_desktop_file($) { my ($prefix) = @_; - my @toMove = qw(doc.kdelnk news.kdelnk updates.kdelnk home.kdelnk printer.kdelnk floppy.kdelnk cdrom.kdelnk); + my @toMove = qw(doc.kdelnk news.kdelnk updates.kdelnk home.kdelnk printer.kdelnk floppy.kdelnk cdrom.kdelnk FLOPPY.kdelnk CDROM.kdelnk); foreach (list_skels()) { my $dir = "$prefix$_"; if (-d "$dir/Desktop") { - my @toSubst = glob_("$dir/Desktop/.*\.rpmorig"); + my @toSubst = glob_("$dir/Desktop/*rpmorig"); push @toSubst, "$dir/Desktop/$_" foreach @toMove; #- remove any existing save in Trash of each user and #- move appropriate file there after an upgrade. foreach (@toSubst) { - my $basename = basename($_); + if (-e $_) { + my $basename = basename($_); - unlink "$dir/Desktop/Trash/$basename"; - rename $_, "$dir/Desktop/Trash/$basename"; + unlink "$dir/Desktop/Trash/$basename"; + rename $_, "$dir/Desktop/Trash/$basename"; + } } } } diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index b7d31f6a4..f628ff7fa 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -283,7 +283,7 @@ GridHeight=70 #- move some file after an upgrade that may be seriously annoying. if ($o->{isUpgrade}) { - log::l("moving previous desktop files that have been updated to \$HOME/tmp of each user"); + log::l("moving previous desktop files that have been updated to Trash of each user"); install_any::move_desktop_file($o->{prefix}); } } diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm index 2679f80ef..0cbe641bd 100644 --- a/perl-install/pkgs.pm +++ b/perl-install/pkgs.pm @@ -412,11 +412,11 @@ sub selectPackagesToUpgrade($$$;$$) { if ($p) { eval { getHeader($p) }; $@ && log::l("cannot get the header for package $p->{name}"); my $version_cmp = versionCompare(c::headerGetEntry($header, 'version'), $p->{version}); - my $version_rel_cmp = $p->{header} ? c::rpmVersionCompare($header, $p->{header}) : + my $version_rel_test = $p->{header} ? c::rpmVersionCompare($header, $p->{header}) >= 0 : ($version_cmp > 0 || $version_cmp == 0 && - versionCompare(c::headerGetEntry($header, 'release'), $p->{release})); - if ($version_rel_cmp >= 0) { + versionCompare(c::headerGetEntry($header, 'release'), $p->{release}) >= 0); + if ($version_rel_test) { if ($otherPackage && $version_cmp <= 0) { $toRemove{$otherPackage} = 1; #- force removing for theses other packages, select our. } else { @@ -600,7 +600,7 @@ sub install($$$) { }; c::rpmtransSetScriptFd($trans, fileno LOG); - eval { fs::mount("/proc", "$prefix/proc", "proc", 0) }; + eval { fs::mount("/proc", "$prefix/proc", "proc", 0) } unless -e "$prefix/proc/cpuinfo"; my $callbackOpen = sub { my $f = (my $p = $packages{$_[0]})->{file}; @@ -651,7 +651,7 @@ sub remove($$) { c::rpmtransRemovePackages($db, $trans, $p) if $p !~ /kernel/; } - eval { fs::mount("/proc", "$prefix/proc", "proc", 0) }; + eval { fs::mount("/proc", "$prefix/proc", "proc", 0) } unless -e "$prefix/proc/cpuinfo"; my $callbackOpen = sub { log::l("trying to open file from $_[0] which should not happen"); }; my $callbackClose = sub { log::l("trying to close file from $_[0] which should not happen"); }; |