summaryrefslogtreecommitdiffstats
path: root/perl-install/install/pkgs.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-09-14 15:17:04 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-09-14 15:17:04 +0000
commit09af6fc79715341c9847c51e6ed342eafe5c8497 (patch)
treec96cbf1fd5ba93465777644fdb8ddd669587b582 /perl-install/install/pkgs.pm
parent149fb8a5a816f6b90c3e39815a4537a46f21d03c (diff)
downloaddrakx-backup-do-not-use-09af6fc79715341c9847c51e6ed342eafe5c8497.tar
drakx-backup-do-not-use-09af6fc79715341c9847c51e6ed342eafe5c8497.tar.gz
drakx-backup-do-not-use-09af6fc79715341c9847c51e6ed342eafe5c8497.tar.bz2
drakx-backup-do-not-use-09af6fc79715341c9847c51e6ed342eafe5c8497.tar.xz
drakx-backup-do-not-use-09af6fc79715341c9847c51e6ed342eafe5c8497.zip
- packageCallbackChoices: use prefered packages given by perl-URPM 2.00
and perl-URPM now handles nicely locales-* as prefered packages
Diffstat (limited to 'perl-install/install/pkgs.pm')
-rw-r--r--perl-install/install/pkgs.pm19
1 files changed, 6 insertions, 13 deletions
diff --git a/perl-install/install/pkgs.pm b/perl-install/install/pkgs.pm
index d65fc7c0d..4381d3d91 100644
--- a/perl-install/install/pkgs.pm
+++ b/perl-install/install/pkgs.pm
@@ -179,9 +179,11 @@ sub packageRequest {
}
sub packageCallbackChoices {
- my ($urpm, $_db, $_state, $choices, $virtual_pkg_name) = @_;
-
- if (my @l = packageCallbackChoices_($urpm, $choices)) {
+ my ($urpm, $_db, $_state, $choices, $virtual_pkg_name, $prefered) = @_;
+
+ if ($prefered && @$prefered) {
+ @$prefered;
+ } elsif (my @l = packageCallbackChoices_($urpm, $choices)) {
@l;
} else {
log::l("packageCallbackChoices: default choice from " . join(",", map { $_->name } @$choices) . " for $virtual_pkg_name");
@@ -219,16 +221,7 @@ sub packageCallbackChoices_ {
@l;
} else {
- grep {
- #- or even if a package requires a specific locales which
- #- is already selected.
- find {
- /locales-/ && do {
- my $p = packageByName($urpm, $_);
- $p && $p->flag_available;
- };
- } $_->requires_nosense;
- } @$choices;
+ ();
}
}