diff options
author | Christophe Fergeau <cfergeau@mandriva.com> | 2009-07-28 13:16:03 +0000 |
---|---|---|
committer | Christophe Fergeau <cfergeau@mandriva.com> | 2009-07-28 13:16:03 +0000 |
commit | 0d098574732d935199379e9b5477d664746ad6e4 (patch) | |
tree | 835a31dd9c20f53112dcdf6a2343cb18eeff1360 /URPM/Resolve.pm | |
parent | 53d47517575dbe57541b353cf7a5a14f11a4b9d2 (diff) | |
download | perl-URPM-0d098574732d935199379e9b5477d664746ad6e4.tar perl-URPM-0d098574732d935199379e9b5477d664746ad6e4.tar.gz perl-URPM-0d098574732d935199379e9b5477d664746ad6e4.tar.bz2 perl-URPM-0d098574732d935199379e9b5477d664746ad6e4.tar.xz perl-URPM-0d098574732d935199379e9b5477d664746ad6e4.zip |
add a backtrack entry "conflicts" for avoided packages in backtrack_selected
Patch from Anssi Hannula, fixes part of bug #52153
Diffstat (limited to 'URPM/Resolve.pm')
-rw-r--r-- | URPM/Resolve.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm index f10695c..a0dd92e 100644 --- a/URPM/Resolve.pm +++ b/URPM/Resolve.pm @@ -575,6 +575,11 @@ sub backtrack_selected { if ($state->{rejected}{$_->fullname}) { #- keep in mind a backtrack has happening here... exists $dep->{promote} and _add_rejected_backtrack($state, $_, { promote => [ $dep->{promote} ] }); + + my $closure = $state->{rejected}{$_->fullname}{closure} || {}; + foreach my $p (grep { exists $closure->{$_}{avoid} } keys %$closure) { + _add_rejected_backtrack($state, $_, { conflicts => [ $p ] }) + } #- backtrack callback should return a strictly positive value if the selection of the new #- package is prefered over the currently selected package. next; @@ -723,7 +728,7 @@ sub _set_rejected_from { $pkg->fullname ne $from_pkg->fullname or return; - $state->{rejected}{$pkg->fullname}{closure}{$from_pkg->fullname} ||= undef; + $state->{rejected}{$pkg->fullname}{closure}{$from_pkg->fullname}{avoid} ||= undef; } #- side-effects: $state->{rejected} |