summaryrefslogtreecommitdiffstats
path: root/perl-install/install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/install')
-rw-r--r--perl-install/install/NEWS5
-rw-r--r--perl-install/install/pkgs.pm7
2 files changed, 9 insertions, 3 deletions
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index 3be68e94c..9b81fc2ce 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,3 +1,8 @@
+- internal
+ o computeGroupSize: do direct requires before choices
+ (eg for epiphany: require libmozilla-firefox2.0.0.6 before choosing
+ package providing libmozjs.so)
+
Version 10.4.165 - 10 August 2007, by Thierry Vignaud
- fix detecting sound cards
diff --git a/perl-install/install/pkgs.pm b/perl-install/install/pkgs.pm
index dbf6c07c6..7df037c87 100644
--- a/perl-install/install/pkgs.pm
+++ b/perl-install/install/pkgs.pm
@@ -493,8 +493,9 @@ sub computeGroupSize {
$newSelection{$id} = undef;
my $pkg = $packages->{depslist}[$id];
- foreach ($pkg->requires_nosense) {
- my @choices = keys %{$packages->{provides}{$_} || {}};
+ my @requires = map { [ $_, keys %{$packages->{provides}{$_} || {}} ] } $pkg->requires_nosense;
+ foreach (sort { @$a <=> @$b } @requires) { #- sort on number of provides (it helps choosing "b" in: "a" requires both "b" and virtual={"b","c"})
+ my ($virtual, @choices) = @$_;
if (@choices <= 1) {
#- only one choice :)
} elsif (find { exists $newSelection{$_} } @choices) {
@@ -504,7 +505,7 @@ sub computeGroupSize {
if (find { $_->flag_available } @choices_pkgs) {
@choices = (); #- one package is already selected (?)
} else {
- @choices = map { $_->id } packageCallbackChoices($packages, undef, undef, \@choices_pkgs, $_);
+ @choices = map { $_->id } packageCallbackChoices($packages, undef, undef, \@choices_pkgs, $virtual);
}
}
push @l2, @choices;