summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-08-12 14:17:39 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-08-12 14:17:39 +0000
commitb6764551eb60f54fbab7ab10829871f56df24f2d (patch)
tree92cacbc2de69782f80c2294632e979ef2449e215 /perl-install
parente93eebce620d5f30ae350b8e7dc79c1ee5633b04 (diff)
downloaddrakx-b6764551eb60f54fbab7ab10829871f56df24f2d.tar
drakx-b6764551eb60f54fbab7ab10829871f56df24f2d.tar.gz
drakx-b6764551eb60f54fbab7ab10829871f56df24f2d.tar.bz2
drakx-b6764551eb60f54fbab7ab10829871f56df24f2d.tar.xz
drakx-b6764551eb60f54fbab7ab10829871f56df24f2d.zip
- internal
o computeGroupSize: do direct requires before choices (eg for epiphany: require libmozilla-firefox2.0.0.6 before choosing package providing libmozjs.so) ps: is such a thing already done in perl-URPM's resolve_requested() ?
Diffstat (limited to 'perl-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;