summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2001-03-08 16:06:11 +0000
committerFrancois Pons <fpons@mandriva.com>2001-03-08 16:06:11 +0000
commitf33d79577db862a95f802d1195202772ad3762b8 (patch)
tree47d3fada250ed82b9f6f6d5ae2f4c7fbd2ce73bb /perl-install
parent2c754c3e19a8c25f797c817969bf62ff99464230 (diff)
downloaddrakx-f33d79577db862a95f802d1195202772ad3762b8.tar
drakx-f33d79577db862a95f802d1195202772ad3762b8.tar.gz
drakx-f33d79577db862a95f802d1195202772ad3762b8.tar.bz2
drakx-f33d79577db862a95f802d1195202772ad3762b8.tar.xz
drakx-f33d79577db862a95f802d1195202772ad3762b8.zip
changed choice of package for selection.
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/pkgs.pm12
1 files changed, 7 insertions, 5 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index a3b070419..c53971225 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -2,7 +2,7 @@ package pkgs; # $Id$
use diagnostics;
use strict;
-use vars qw(*LOG @preferred $limitMinTrans %compssListDesc);
+use vars qw(*LOG %preferred $limitMinTrans %compssListDesc);
use common qw(:common :file :functional :system);
use install_any;
@@ -17,7 +17,8 @@ use c;
-@preferred = qw(perl-GTK postfix wu-ftpd ghostscript-X vim-minimal kernel ispell-en);
+my @preferred = qw(perl-GTK postfix wu-ftpd ghostscript-X vim-minimal kernel db1 db2 ispell-en);
+@preferred{@preferred} = ();
#- lower bound on the left ( aka 90 means [90-100[ )
%compssListDesc = (
@@ -225,19 +226,20 @@ sub selectPackage { #($$;$$$)
#- is only used for unselection, not selection)
unless (packageFlagSelected($pkg)) {
foreach (packageDepsId($pkg)) {
- my $preferred;
if (/\|/) {
#- choice deps should be reselected recursively as no
#- closure on them is computed, this code is exactly the
#- same as pixel's one.
- my %preferred; @preferred{@preferred} = ();
+ my $preferred;
foreach (split '\|') {
my $dep = packageById($packages, $_) or next;
$preferred ||= $dep;
packageFlagSelected($dep) and $preferred = $dep, last;
exists $preferred{packageName($dep)} and $preferred = $dep;
}
- selectPackage($packages, $preferred, $base, $otherOnly, $check_recursion) if $preferred;
+ $preferred or die "unable to find a package for choice";
+ packageFlagSelected($preferred) or log::l("selecting default package as $preferred->[$FILE]");
+ selectPackage($packages, $preferred, $base, $otherOnly, $check_recursion);
} else {
#- deps have been closed except for choices, so no need to
#- recursively apply selection, expand base on it.