summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-12-08 14:28:09 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-12-08 14:28:09 +0000
commitbe1a53d6b4c54d18f97188ba0db7b258a60ba9ac (patch)
tree21b3798c60c278688c6f4fe1d7b716056bbb485f /urpm.pm
parentc49b7811881db1afc6c69e1056bc06bc58213f0f (diff)
downloadurpmi-be1a53d6b4c54d18f97188ba0db7b258a60ba9ac.tar
urpmi-be1a53d6b4c54d18f97188ba0db7b258a60ba9ac.tar.gz
urpmi-be1a53d6b4c54d18f97188ba0db7b258a60ba9ac.tar.bz2
urpmi-be1a53d6b4c54d18f97188ba0db7b258a60ba9ac.tar.xz
urpmi-be1a53d6b4c54d18f97188ba0db7b258a60ba9ac.zip
Fix a regression (introduced in urpm.pm revision 1.579) : the packages that
obsoleted older packages were installed as 'install', not as 'upgrade', thus rpm wasn't attempting to deinstall the old package.
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/urpm.pm b/urpm.pm
index 6dbdf825..87d9245d 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -2893,12 +2893,14 @@ sub prepare_transaction {
#- extract package that should be installed instead of upgraded,
#- sources is a hash of id -> source rpm filename.
sub extract_packages_to_install {
- my ($urpm, $sources) = @_;
+ my ($urpm, $sources, $state) = @_;
my %inst;
+ my $rej = ref $state ? $state->{rejected} || {} : {};
foreach (keys %$sources) {
my $pkg = $urpm->{depslist}[$_] or next;
$pkg->flag_disable_obsolete || !$pkg->flag_installed
+ and !grep { exists $rej->{$_}{closure}{$pkg->fullname} } keys %$rej
and $inst{$pkg->id} = delete $sources->{$pkg->id};
}