summaryrefslogtreecommitdiffstats
path: root/perl-install/pkgs.pm
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 /perl-install/pkgs.pm
parent12cc4c15aec4344f61f13f856dffffd5a9de0b87 (diff)
downloaddrakx-08f4b5bf2f57dc0d75dcde2cec410a16e1f65f20.tar
drakx-08f4b5bf2f57dc0d75dcde2cec410a16e1f65f20.tar.gz
drakx-08f4b5bf2f57dc0d75dcde2cec410a16e1f65f20.tar.bz2
drakx-08f4b5bf2f57dc0d75dcde2cec410a16e1f65f20.tar.xz
drakx-08f4b5bf2f57dc0d75dcde2cec410a16e1f65f20.zip
*** empty log message ***
Diffstat (limited to 'perl-install/pkgs.pm')
-rw-r--r--perl-install/pkgs.pm12
1 files changed, 6 insertions, 6 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);
}