aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@mandriva.com>2009-03-20 18:32:38 +0000
committerChristophe Fergeau <cfergeau@mandriva.com>2009-03-20 18:32:38 +0000
commitb24abcef6555724bf4bc4012b44458f1f2ea297f (patch)
tree0d0e9449dadba5f3812d779f251703e65e3daf45
parent657c6c5a0be2ba53941d55b3fac335e0a89ddce4 (diff)
downloadperl-URPM-b24abcef6555724bf4bc4012b44458f1f2ea297f.tar
perl-URPM-b24abcef6555724bf4bc4012b44458f1f2ea297f.tar.gz
perl-URPM-b24abcef6555724bf4bc4012b44458f1f2ea297f.tar.bz2
perl-URPM-b24abcef6555724bf4bc4012b44458f1f2ea297f.tar.xz
perl-URPM-b24abcef6555724bf4bc4012b44458f1f2ea297f.zip
check rep for another pkg providing X if the prev pkg gets removed due to a conflict
Fixes bug #47803, patch from Anssi Hannula Closer look at urpmi revealed it only does this if a provide X is removed from an upgraded package, not when a package providing X has to be removed. i.e. this works: A provides foo B provides foo C requires foo Installed A,C. A is upgraded and Provides:foo is dropped, B gets installed in order to keep C. But this won't: A provides foo A requires dep B provides foo C requires foo D provides dep Installed A,C,D. D is upgraded and Provides:dep is dropped, A gets removed, C gets removed.
-rw-r--r--URPM/Resolve.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm
index 0cf96c3..f672a0d 100644
--- a/URPM/Resolve.pm
+++ b/URPM/Resolve.pm
@@ -1015,7 +1015,7 @@ sub resolve_requested__no_suggests_ {
push @diff_provides, map { +{ name => $_, pkg => $pkg } } keys %diff_provides_h;
}
if (my $diff = shift @diff_provides) {
- _handle_diff_provides($urpm, $db, $state, \@properties, $diff->{name}, $diff->{pkg}, %options);
+ _handle_diff_provides($urpm, $db, $state, \@properties, \@diff_provides, $diff->{name}, $diff->{pkg}, %options);
}
} while @diff_provides || @properties;
@@ -1197,7 +1197,7 @@ sub _find_packages_obsoleting {
#- + those of backtrack_selected_psel_keep ($state->{rejected}, $state->{selected}, $state->{whatrequires}, flag_requested, flag_required)
#- + those of resolve_rejected_ ($state->{rejected}, $properties)
sub _handle_diff_provides {
- my ($urpm, $db, $state, $properties, $n, $pkg, %options) = @_;
+ my ($urpm, $db, $state, $properties, $diff_provides, $n, $pkg, %options) = @_;
with_any_unsatisfied_requires($urpm, $db, $state, $n, sub {
my ($p, @unsatisfied) = @_;
@@ -1238,11 +1238,13 @@ sub _handle_diff_provides {
if ($options{keep}) {
backtrack_selected_psel_keep($urpm, $db, $state, $pkg, [ scalar $p->fullname ]);
} else {
- resolve_rejected_($urpm, $db, $state, $properties, {
+ my %diff_provides_h;
+ set_rejected_and_compute_diff_provides($urpm, $state, \%diff_provides_h, {
rejected_pkg => $p, removed => 1,
from => $pkg,
why => { unsatisfied => \@unsatisfied },
});
+ push @$diff_provides, map { +{ name => $_, pkg => $pkg } } keys %diff_provides_h;
}
}
}