summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-02-25 18:15:31 +0000
committerFrancois Pons <fpons@mandriva.com>2003-02-25 18:15:31 +0000
commit16e29d6b9a28e5ed25c6f5f65fb891074870286f (patch)
tree9815dd654075b6f05e0fd44046e5b599f741efc6
parent756f3986bdc8bde1a85d1d45a6245ce14dcb9065 (diff)
downloaddrakx-backup-do-not-use-16e29d6b9a28e5ed25c6f5f65fb891074870286f.tar
drakx-backup-do-not-use-16e29d6b9a28e5ed25c6f5f65fb891074870286f.tar.gz
drakx-backup-do-not-use-16e29d6b9a28e5ed25c6f5f65fb891074870286f.tar.bz2
drakx-backup-do-not-use-16e29d6b9a28e5ed25c6f5f65fb891074870286f.tar.xz
drakx-backup-do-not-use-16e29d6b9a28e5ed25c6f5f65fb891074870286f.zip
improved code for populating group with pixel.
-rw-r--r--perl-install/pkgs.pm33
1 files changed, 22 insertions, 11 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index 3719c5309..02c60d989 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -665,7 +665,7 @@ sub computeGroupSize {
}
join("\t", map { join('&&', @$_) } @r);
}
- my (%group, %memo);
+ my (%group, %memo, $slowpart_counter);
foreach my $p (@{$packages->{depslist}}) {
my @flags = $p->rflags;
@@ -688,16 +688,27 @@ sub computeGroupSize {
my $pkg = $packages->{depslist}[$id];
foreach ($pkg->requires_nosense) {
- my ($candidate_id, $prefer_id);
- foreach (keys %{$packages->{provides}{$_} || {}}) {
- my $ppkg = $packages->{depslist}[$_] or next;
- $ppkg->flag_available and $prefer_id = $candidate_id = undef, last;
- exists $preferred{$ppkg->name} and $prefer_id = $_;
- $ppkg->name =~ /kernel-\d/ and $prefer_id ||= $_;
- $candidate_id = $_;
- }
- if (defined $prefer_id || defined $candidate_id) {
- push @l2, defined $prefer_id ? $prefer_id : $candidate_id;
+ my @choices = keys %{$packages->{provides}{$_} || {}};
+ if (@choices <= 1) {
+ push @l2, @choices;
+ } elsif (! find { exists $newSelection{$_} } @choices) {
+ my ($candidate_id, $prefer_id);
+ foreach (@choices) {
+ ++$slowpart_counter;
+ my $ppkg = $packages->{depslist}[$_] or next;
+ $ppkg->flag_available and $prefer_id = $candidate_id = undef, last;
+ exists $preferred{$ppkg->name} and $prefer_id = $_;
+ $ppkg->name =~ /kernel-\d/ and $prefer_id ||= $_;
+ foreach my $l ($ppkg->requires_nosense) {
+ /locales-/ or next;
+ my $pppkg = packageByName($packages, $l) or next;
+ $pppkg->flag_available and $prefer_id ||= $_;
+ }
+ $candidate_id = $_;
+ }
+ if (defined $prefer_id || defined $candidate_id) {
+ push @l2, defined $prefer_id ? $prefer_id : $candidate_id;
+ }
}
}
}