summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2000-04-03 13:12:27 +0000
committerFrancois Pons <fpons@mandriva.com>2000-04-03 13:12:27 +0000
commit08f4b5bf2f57dc0d75dcde2cec410a16e1f65f20 (patch)
tree4c0722403913607174297895c3f18eb41d89e03a
parent12cc4c15aec4344f61f13f856dffffd5a9de0b87 (diff)
downloaddrakx-backup-do-not-use-08f4b5bf2f57dc0d75dcde2cec410a16e1f65f20.tar
drakx-backup-do-not-use-08f4b5bf2f57dc0d75dcde2cec410a16e1f65f20.tar.gz
drakx-backup-do-not-use-08f4b5bf2f57dc0d75dcde2cec410a16e1f65f20.tar.bz2
drakx-backup-do-not-use-08f4b5bf2f57dc0d75dcde2cec410a16e1f65f20.tar.xz
drakx-backup-do-not-use-08f4b5bf2f57dc0d75dcde2cec410a16e1f65f20.zip
*** empty log message ***
-rw-r--r--perl-install/pkgs.pm12
-rw-r--r--perl-install/share/list2
-rwxr-xr-xtools/syncrpms2
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 $_;
}