From 08f4b5bf2f57dc0d75dcde2cec410a16e1f65f20 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Mon, 3 Apr 2000 13:12:27 +0000 Subject: *** empty log message *** --- perl-install/pkgs.pm | 12 ++++++------ perl-install/share/list | 2 ++ tools/syncrpms | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm index f9b569dee..bc14df244 100644 --- a/perl-install/pkgs.pm +++ b/perl-install/pkgs.pm @@ -530,7 +530,7 @@ sub versionCompare($$) { my ($a, $b) = @_; local $_; - while ($a && $b) { + while ($a || $b) { my ($sb, $sa) = map { $1 if $a =~ /^\W*\d/ ? s/^\W*0*(\d+)// : s/^\W*(\D+)// } ($b, $a); $_ = length($sa) cmp length($sb) || $sa cmp $sb and return $_; } @@ -563,9 +563,10 @@ sub selectPackagesToUpgrade($$$;$$) { #- TODO my %installedFilesForUpgrade; #- help searching package to upgrade in regard to already installed files. #- used for package that are not correctly updated. + #- should only be used when nothing else can be done correctly. my %upgradeNeedRemove = ( - 'compat-glibc' => 1, - 'compat-libs' => 1, +# 'compat-glibc' => 1, +# 'compat-libs' => 1, ); #- help removing package which may have different release numbering @@ -585,10 +586,9 @@ sub selectPackagesToUpgrade($$$;$$) { #- TODO my $version_cmp = versionCompare(c::headerGetEntry($header, 'version'), packageVersion($p)); my $version_rel_test = $version_cmp > 0 || $version_cmp == 0 && versionCompare(c::headerGetEntry($header, 'release'), packageRelease($p)) >= 0; - if ($version_rel_test) { #- use FORCE TODO ? + if ($version_rel_test) { #- by default, package selecting are upgrade whatever version is ! if ($otherPackage && $version_cmp <= 0) { - log::l("removing $otherPackage since it will not be updated otherwise"); - $toRemove{$otherPackage} = 1; #- force removing for theses other packages, select our. + log::l("force upgrading $otherPackage since it will not be updated otherwise"); } else { packageSetFlagInstalled($p, 1); } diff --git a/perl-install/share/list b/perl-install/share/list index 8db700e78..41fc0e2d5 100644 --- a/perl-install/share/list +++ b/perl-install/share/list @@ -6,6 +6,8 @@ /lib/libresolv.so.2 /lib/libresolv.so.2.1 /etc/protocols +/etc/imrc +/etc/im_palette.pal /sbin/fdisk /sbin/insmod /sbin/mkraid diff --git a/tools/syncrpms b/tools/syncrpms index 0befdd6cc..2073b6e84 100755 --- a/tools/syncrpms +++ b/tools/syncrpms @@ -28,7 +28,7 @@ sub version_compare { my ($a, $b) = @_; local $_; - while ($a && $b) { + while ($a || $b) { my ($sb, $sa) = map { $1 if $a =~ /^\W*\d/ ? s/^\W*0*(\d+)// : s/^\W*(\D+)// } ($b, $a); $_ = length($sa) cmp length($sb) || $sa cmp $sb and return $_; } -- cgit v1.2.1