aboutsummaryrefslogtreecommitdiffstats
path: root/URPM
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-09-27 15:30:38 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-09-27 15:30:38 +0000
commit456ef3de580c076d824d183eba0c03e8a9d4e848 (patch)
treec5fc0f2f121dc7869f31a6ec419907615c6dfcec /URPM
parent3965d631ca4bc7f8843c13784fa0679af33d0c21 (diff)
downloadperl-URPM-456ef3de580c076d824d183eba0c03e8a9d4e848.tar
perl-URPM-456ef3de580c076d824d183eba0c03e8a9d4e848.tar.gz
perl-URPM-456ef3de580c076d824d183eba0c03e8a9d4e848.tar.bz2
perl-URPM-456ef3de580c076d824d183eba0c03e8a9d4e848.tar.xz
perl-URPM-456ef3de580c076d824d183eba0c03e8a9d4e848.zip
- handle promotion via obsolete, not only provides
Diffstat (limited to 'URPM')
-rw-r--r--URPM/Resolve.pm12
1 files changed, 12 insertions, 0 deletions
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};