From 5970762662e924d663c119913af7f7d722970e64 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Wed, 10 Sep 2003 11:45:57 +0000 Subject: fixed bad ARRAY reference (promote). --- URPM/Resolve.pm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'URPM/Resolve.pm') diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm index 018d9c9..27106d8 100644 --- a/URPM/Resolve.pm +++ b/URPM/Resolve.pm @@ -212,7 +212,7 @@ sub backtrack_selected { dep => $dep, alternatives => $packages, %options) <= 0) { #- keep in mind a backtrack has happening here... $state->{rejected}{$_->fullname}{backtrack} ||= - { exists $dep->{promote} ? (promote => $dep->{promote}) : @{[]}, + { exists $dep->{promote} ? (promote => [ $dep->{promote} ]) : @{[]}, exists $dep->{psel} ? (psel => $dep->{psel}) : @{[]}, }; #- backtrack callback should return a strictly positive value if the selection of the new @@ -279,8 +279,7 @@ sub backtrack_selected { #- the package is already rejected, we assume we can add another reason here! defined $dep->{promote} and push @{$state->{rejected}{$dep->{psel}->fullname}{backtrack}{promote}}, $dep->{promote}; #- to simplify, a reference to list or standalone elements may be set in keep. - defined $dep->{keep} and push @{$state->{rejected}{$dep->{psel}->fullname}{backtrack}{keep}}, - ref $dep->{keep} ? @{$dep->{keep}} : $dep->{keep}; + defined $dep->{keep} and push @{$state->{rejected}{$dep->{psel}->fullname}{backtrack}{keep}}, @{$dep->{keep}}; } else { #- the backtrack need to examine diff_provides promotion on $n. $db->traverse_tag('whatrequires', [ $dep->{promote} ], sub { @@ -683,7 +682,7 @@ sub resolve_requested { } else { if ($options{keep}) { unshift @properties, $urpm->backtrack_selected($db, $state, - { keep => scalar $p->fullname, + { keep => [ scalar $p->fullname ], psel => $pkg, }, %options); -- cgit v1.2.1