From 456ef3de580c076d824d183eba0c03e8a9d4e848 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 27 Sep 2007 15:30:38 +0000 Subject: - handle promotion via obsolete, not only provides --- URPM/Resolve.pm | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'URPM') diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm index d8eca12..f47b562 100644 --- a/URPM/Resolve.pm +++ b/URPM/Resolve.pm @@ -1018,6 +1018,18 @@ sub _handle_diff_provides { unsatisfied_requires($urpm, $db, $state, $_, name => $n) == 0 } @packages; + if (!@packages) { + @packages = packages_obsoleting($urpm, $p->name); + @packages = grep { + !$_->flag_skip + && $_->is_arch_compat + && !exists $state->{rejected}->{$_->fullname} + && $_->obsoletes_overlap($p->name . " == " . $p->epoch . ":" . $p->version . "-" . $p->release) + && $_->fullname ne $p->fullname && + unsatisfied_requires($urpm, $db, $state, $_, name => $n) == 0; + } @packages; + } + if (@packages) { my $best = join('|', map { $_->id } @packages); $urpm->{debug_URPM}("promoting " . $urpm->{depslist}[$best]->fullname . " because of conflict above") if $urpm->{debug_URPM}; -- cgit v1.2.1