From e2e7a6c666eb615770d59b1b7db900f9bd159a67 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Wed, 1 Feb 2006 14:03:52 +0000 Subject: Attempt to fix a bug in translate_why_unselected on x86_64 where sometimes ids were reported instead of human-readable dependencies. --- urpm.pm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/urpm.pm b/urpm.pm index db8e272f..504eff54 100644 --- a/urpm.pm +++ b/urpm.pm @@ -3211,14 +3211,20 @@ sub unselected_packages { sub uniq { my %l; $l{$_} = 1 foreach @_; grep { delete $l{$_} } @_ } sub translate_why_unselected { - my (undef, $state, @l) = @_; + my ($urpm, $state, @l) = @_; - map { my $rb = $state->{rejected}{$_}{backtrack}; + map { + my $rb = $state->{rejected}{$_}{backtrack}; my @froms = keys %{$rb->{closure} || {}}; my @unsatisfied = @{$rb->{unsatisfied} || []}; my $s = join ", ", ( (map { N("due to missing %s", $_) } @froms), - (map { N("due to unsatisfied %s", $_) } uniq @unsatisfied), + (map { N("due to unsatisfied %s", $_) } uniq map { + #- XXX in theory we shouldn't need this, dependencies (and not ids) should + #- already be present in @unsatisfied. But with biarch packages this is + #- not always the case. + /\D/ ? $_ : scalar($urpm->{depslist}[$_]->fullname) + } @unsatisfied), $rb->{promote} && !$rb->{keep} ? N("trying to promote %s", join(", ", @{$rb->{promote}})) : @{[]}, $rb->{keep} ? N("in order to keep %s", join(", ", @{$rb->{keep}})) : @{[]}, ); -- cgit v1.2.1