summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2006-11-09 15:43:32 +0000
committerPascal Rigaux <pixel@mandriva.com>2006-11-09 15:43:32 +0000
commit5e3aee184296b595f781dae5a7087d6c113fcefa (patch)
treef7c66aef62b7d29ef4502ec5b75a170d4c57d856 /urpm.pm
parent5ac0c63afbd2d55c7a1c271e032439c0955034a7 (diff)
downloadurpmi-5e3aee184296b595f781dae5a7087d6c113fcefa.tar
urpmi-5e3aee184296b595f781dae5a7087d6c113fcefa.tar.gz
urpmi-5e3aee184296b595f781dae5a7087d6c113fcefa.tar.bz2
urpmi-5e3aee184296b595f781dae5a7087d6c113fcefa.tar.xz
urpmi-5e3aee184296b595f781dae5a7087d6c113fcefa.zip
restore uniq() (i sucks)
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/urpm.pm b/urpm.pm
index b252a066..fd92a55b 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -3270,6 +3270,8 @@ sub unselected_packages {
grep { $state->{rejected}{$_}{backtrack} } keys %{$state->{rejected} || {}};
}
+sub uniq { my %l; $l{$_} = 1 foreach @_; grep { delete $l{$_} } @_ }
+
sub translate_why_unselected {
my ($urpm, $state, @l) = @_;
@@ -3279,12 +3281,12 @@ sub translate_why_unselected {
my @unsatisfied = @{$rb->{unsatisfied} || []};
my $s = join ", ", (
(map { N("due to missing %s", $_) } @froms),
- (map { N("due to unsatisfied %s", $_) } uniq map {
+ (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),
+ } @unsatisfied)),
$rb->{promote} && !$rb->{keep} ? N("trying to promote %s", join(", ", @{$rb->{promote}})) : @{[]},
$rb->{keep} ? N("in order to keep %s", join(", ", @{$rb->{keep}})) : @{[]},
);