summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-07-09 21:38:13 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-07-09 21:38:13 +0000
commit30566fd5803a17be20f1376887d2cf3d8555da7d (patch)
tree083978859a28efc707a71ae32912aaa232f573d5
parentb371300ca728e700a017783a410a840f2a3d3134 (diff)
downloadurpmi-30566fd5803a17be20f1376887d2cf3d8555da7d.tar
urpmi-30566fd5803a17be20f1376887d2cf3d8555da7d.tar.gz
urpmi-30566fd5803a17be20f1376887d2cf3d8555da7d.tar.bz2
urpmi-30566fd5803a17be20f1376887d2cf3d8555da7d.tar.xz
urpmi-30566fd5803a17be20f1376887d2cf3d8555da7d.zip
cleanup
-rw-r--r--urpm/parallel.pm18
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;