summaryrefslogtreecommitdiffstats
path: root/perl-install/pkgs.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2000-01-06 13:20:43 +0000
committerFrancois Pons <fpons@mandriva.com>2000-01-06 13:20:43 +0000
commit697a2d44ab4f631233e222fd25e4e127b2cda2d4 (patch)
treece92337d6ea02937f7ac6870c990ecac1970456e /perl-install/pkgs.pm
parent1aa830a04246a89a305be3ca3b8b2615c1d88065 (diff)
downloaddrakx-backup-do-not-use-697a2d44ab4f631233e222fd25e4e127b2cda2d4.tar
drakx-backup-do-not-use-697a2d44ab4f631233e222fd25e4e127b2cda2d4.tar.gz
drakx-backup-do-not-use-697a2d44ab4f631233e222fd25e4e127b2cda2d4.tar.bz2
drakx-backup-do-not-use-697a2d44ab4f631233e222fd25e4e127b2cda2d4.tar.xz
drakx-backup-do-not-use-697a2d44ab4f631233e222fd25e4e127b2cda2d4.zip
*** empty log message ***
Diffstat (limited to 'perl-install/pkgs.pm')
-rw-r--r--perl-install/pkgs.pm15
1 files changed, 12 insertions, 3 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index 0cbe641bd..cc7197bb7 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -418,6 +418,7 @@ sub selectPackagesToUpgrade($$$;$$) {
versionCompare(c::headerGetEntry($header, 'release'), $p->{release}) >= 0);
if ($version_rel_test) {
if ($otherPackage && $version_cmp <= 0) {
+ log::l("removing $otherPackage since it be not be updated otherwise");
$toRemove{$otherPackage} = 1; #- force removing for theses other packages, select our.
} else {
$p->{installed} = 1;
@@ -560,7 +561,7 @@ sub installCallback {
log::l($msg .": ". join(',', @_));
}
-sub install($$$) {
+sub install($$$;$) {
my ($prefix, $isUpgrade, $toInstall) = @_;
my %packages;
@@ -587,7 +588,7 @@ sub install($$$) {
$p->{name}, $p->{version}, $p->{release},
c::headerGetEntry(getHeader($p), 'arch');
$packages{$p->{name}} = $p;
- c::rpmtransAddPackage($trans, getHeader($p), $p->{name}, $isUpgrade && $p->{name} !~ /kernel/); #- TODO: replace `named kernel' by `provides kernel'
+ c::rpmtransAddPackage($trans, getHeader($p), $p->{name}, $isUpgrade && ($useOnlyUpgrade || $p->{name} !~ /kernel/)); #- TODO: replace `named kernel' by `provides kernel'
$nb++;
$total += $p->{size};
}
@@ -595,8 +596,8 @@ sub install($$$) {
c::rpmdepOrder($trans) or
cdie "error ordering package list: " . c::rpmErrorString(),
sub {
- c::rpmdbClose($db);
c::rpmtransFree($trans);
+ c::rpmdbClose($db);
};
c::rpmtransSetScriptFd($trans, fileno LOG);
@@ -623,6 +624,14 @@ sub install($$$) {
$parts{$3} ? 0 : ($parts{$3} = 1);
} else { 1; }
} reverse @probs;
+
+ c::rpmtransFree($trans);
+ c::rpmdbClose($db);
+# if ($isUpgrade && !$useOnlyUpgrade && %parts) {
+# #- recurse only once to try with only upgrade (including kernel).
+# log::l("trying to upgrade all packages to save space");
+# install($prefix,$isUpgrade,$toInstall,1);
+# }
die "installation of rpms failed:\n ", join("\n ", @probs);
}
c::rpmtransFree($trans);