diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-07-09 21:38:13 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-07-09 21:38:13 +0000 |
commit | 30566fd5803a17be20f1376887d2cf3d8555da7d (patch) | |
tree | 083978859a28efc707a71ae32912aaa232f573d5 | |
parent | b371300ca728e700a017783a410a840f2a3d3134 (diff) | |
download | urpmi-30566fd5803a17be20f1376887d2cf3d8555da7d.tar urpmi-30566fd5803a17be20f1376887d2cf3d8555da7d.tar.gz urpmi-30566fd5803a17be20f1376887d2cf3d8555da7d.tar.bz2 urpmi-30566fd5803a17be20f1376887d2cf3d8555da7d.tar.xz urpmi-30566fd5803a17be20f1376887d2cf3d8555da7d.zip |
cleanup
-rw-r--r-- | urpm/parallel.pm | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/urpm/parallel.pm b/urpm/parallel.pm index 6a9207f4..0fda8e88 100644 --- a/urpm/parallel.pm +++ b/urpm/parallel.pm @@ -129,11 +129,11 @@ sub parse_urpme_output { return; } +#- compute command line of urpm? tools. sub simple_resolve_dependencies { my ($parallel, $urpm, $state, $requested, %options) = @_; - #- compute command line of urpm? tools. - my $line = $parallel->{line} . ($options{auto_select} ? ' --auto-select' : '') . ($options{keep} ? ' --keep' : ''); + my @pkgs; foreach (keys %$requested) { if (/\|/) { #- taken from URPM::Resolve to filter out choices, not complete though. @@ -159,16 +159,20 @@ sub simple_resolve_dependencies { #- simplified choice resolution. my $choice = $options{callback_choices}->($urpm, undef, $state, [ values %$packages ]); if ($choice) { - $urpm->{source}{$choice->id} and next; #- local packages have already been added. - $line .= ' ' . $choice->fullname; + push @pkgs, $choice; } } else { my $pkg = $urpm->{depslist}[$_] or next; - $urpm->{source}{$pkg->id} and next; #- local packages have already been added. - $line .= ' ' . $pkg->fullname; + push @pkgs, $pkg; } } - $line; + #- local packages have already been added. + @pkgs = grep { !$urpm->{source}{$_->id} } @pkgs; + + $parallel->{line} . + ($options{auto_select} ? ' --auto-select' : '') . + ($options{keep} ? ' --keep' : '') . + join(' ', map { scalar $_->fullname } @pkgs); } 1; |