summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2000-11-23 18:17:15 +0000
committerFrancois Pons <fpons@mandriva.com>2000-11-23 18:17:15 +0000
commit81dcd71c5587aeb713861f4efba3b8250c8df685 (patch)
treedee6e0e1bcf03676ef46e93fd4676fb8f8d95f23
parent5c3ddc7b4763a0fd586be3e9c41a811e6f537042 (diff)
downloaddrakx-81dcd71c5587aeb713861f4efba3b8250c8df685.tar
drakx-81dcd71c5587aeb713861f4efba3b8250c8df685.tar.gz
drakx-81dcd71c5587aeb713861f4efba3b8250c8df685.tar.bz2
drakx-81dcd71c5587aeb713861f4efba3b8250c8df685.tar.xz
drakx-81dcd71c5587aeb713861f4efba3b8250c8df685.zip
synced versionCompare() with rpmtools-2.1-4mdk.
removed ugly log on transaction. added special case to avoid counting kernels space when upgrading as these package are not upgraded (just installed).
-rw-r--r--perl-install/pkgs.pm12
1 files changed, 7 insertions, 5 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index af343b281..eb0b5323a 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -826,7 +826,7 @@ sub versionCompare($$) {
local $_;
while ($a || $b) {
- my ($sb, $sa) = map { $1 if $a =~ /^\W*\d/ ? s/^\W*0*(\d+)// : s/^\W*(\D+)// } ($b, $a);
+ my ($sb, $sa) = map { $1 if ($a || 0) =~ /^\W*\d/ ? s/^\W*0*(\d+)// : s/^\W*(\D+)// } ($b, $a);
$_ = length($sa) cmp length($sb) || $sa cmp $sb and return $_;
}
}
@@ -1038,8 +1038,10 @@ sub selectPackagesToUpgrade($$$;$$) {
});
#- keep in mind the cumul size of installed package since they will be deleted
- #- on upgrade.
- print UPGRADE_OUTPUT "$cumulSize:" . packageName($p) . "\n";
+ #- on upgrade, only for package that are allowed to be upgraded.
+ if (allowedToUpgrade(packageName($p))) {
+ print UPGRADE_OUTPUT "$cumulSize:" . packageName($p) . "\n";
+ }
}
}
@@ -1163,8 +1165,8 @@ sub selectPackagesToUpgrade($$$;$$) {
sub allowedToUpgrade { $_[0] !~ /^(kernel|kernel-secure|kernel-smp|kernel-linus|hackkernel)$/ }
sub installCallback {
- my $msg = shift;
- log::l($msg .": ". join(',', @_));
+# my $msg = shift;
+# log::l($msg .": ". join(',', @_));
}
sub install($$$;$$) {