aboutsummaryrefslogtreecommitdiffstats
path: root/URPM
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-06-19 10:31:15 +0000
committerFrancois Pons <fpons@mandriva.com>2003-06-19 10:31:15 +0000
commit0efead983620c6164b110d1bdc8cc188de02b668 (patch)
treea8e612c8c83dc2e86a4285cb726382a99b057128 /URPM
parentccac87c3c2131730bb7c11b2f651d36784ee14c4 (diff)
downloadperl-URPM-0efead983620c6164b110d1bdc8cc188de02b668.tar
perl-URPM-0efead983620c6164b110d1bdc8cc188de02b668.tar.gz
perl-URPM-0efead983620c6164b110d1bdc8cc188de02b668.tar.bz2
perl-URPM-0efead983620c6164b110d1bdc8cc188de02b668.tar.xz
perl-URPM-0efead983620c6164b110d1bdc8cc188de02b668.zip
0.91-5mdk
Diffstat (limited to 'URPM')
-rw-r--r--URPM/Resolve.pm15
1 files changed, 10 insertions, 5 deletions
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm
index 2ced98b..b1f66d3 100644
--- a/URPM/Resolve.pm
+++ b/URPM/Resolve.pm
@@ -218,7 +218,8 @@ sub backtrack_selected {
$options{callback_backtrack}->($urpm, $db, $state, $_,
dep => $dep, alternatives => $packages, %options) <= 0) {
#- keep in mind a backtrack has happening here...
- $state->{rejected}{$_->fullname}{backtrack} ||= {};
+ $state->{rejected}{$_->fullname}{backtrack} ||=
+ { exists $dep->{promote} ? (promote => $dep->{promote}) : @{[]} };
#- backtrack callback should return a strictly positive value if the selection of the new
#- package is prefered over the currently selected package.
next;
@@ -510,9 +511,10 @@ sub resolve_requested {
nopromoteepoch => 1,
avoided => $state->{rejected});
my $best = join '|', map { $_->id }
- grep { $urpm->unsatisfied_requires($db, $state, $_,
- nopromoteepoch => 1,
- name => $n) == 0 }
+ grep { $_->fullname ne $p->fullname &&
+ $urpm->unsatisfied_requires($db, $state, $_,
+ nopromoteepoch => 1,
+ name => $n) == 0 }
@{$packages->{$p->name}};
if (length $best) {
@@ -525,7 +527,10 @@ sub resolve_requested {
$packages = $urpm->find_candidate_packages($_,
nopromoteepoch => 1,
avoided => $state->{rejected});
- $best = join('|', map { $_->id } map { @{$_ || []} } values %$packages);
+ $best = join('|',
+ map { $_->id }
+ grep { $_->fullname ne $p->fullname }
+ map { @{$_ || []} } values %$packages);
$best and push @best, $best;
}