diff options
author | Francois Pons <fpons@mandriva.com> | 2002-08-13 14:21:53 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2002-08-13 14:21:53 +0000 |
commit | e24fb32ac9044de096ed96ebcb9d5798ff350ca2 (patch) | |
tree | 2d7818d51281575ec6242f6323073cb733dfa8e3 /perl-install | |
parent | e13c6c69cc694b81de2caae0807516c3d44838a2 (diff) | |
download | drakx-backup-do-not-use-e24fb32ac9044de096ed96ebcb9d5798ff350ca2.tar drakx-backup-do-not-use-e24fb32ac9044de096ed96ebcb9d5798ff350ca2.tar.gz drakx-backup-do-not-use-e24fb32ac9044de096ed96ebcb9d5798ff350ca2.tar.bz2 drakx-backup-do-not-use-e24fb32ac9044de096ed96ebcb9d5798ff350ca2.tar.xz drakx-backup-do-not-use-e24fb32ac9044de096ed96ebcb9d5798ff350ca2.zip |
allow selecting a choice package according to locales-xx found.
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/pkgs.pm | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm index 4dce1e796..7e79a8ca6 100644 --- a/perl-install/pkgs.pm +++ b/perl-install/pkgs.pm @@ -207,9 +207,18 @@ sub packageRequest { sub packageCallbackChoices { my ($urpm, $db, $state, $choices) = @_; my $prefer; - foreach (@$choices) { - exists $preferred{$_->name} and $prefer = $_; - $_->name =~ /kernel-\d/ and $prefer ||= $_; + foreach my $pkg (@$choices) { + #- examine first an explicitely prefered package. + exists $preferred{$pkg->name} and $prefer = $pkg; + #- or if a kernel has to be chosen, chose the basic one. + $pkg->name =~ /kernel-\d/ and $prefer ||= $pkg; + #- or even if a package requires a specific locales which + #- is already selected. + foreach ($pkg->requires_nosense) { + /locales-/ or next; + my $p = packageByName($packages, $_) or next; + $p->flag_available and $prefer ||= $pkg; + } } $prefer || $choices->[0]; #- first one (for instance). } |