diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-09-14 15:17:04 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-09-14 15:17:04 +0000 |
commit | 09af6fc79715341c9847c51e6ed342eafe5c8497 (patch) | |
tree | c96cbf1fd5ba93465777644fdb8ddd669587b582 | |
parent | 149fb8a5a816f6b90c3e39815a4537a46f21d03c (diff) | |
download | drakx-09af6fc79715341c9847c51e6ed342eafe5c8497.tar drakx-09af6fc79715341c9847c51e6ed342eafe5c8497.tar.gz drakx-09af6fc79715341c9847c51e6ed342eafe5c8497.tar.bz2 drakx-09af6fc79715341c9847c51e6ed342eafe5c8497.tar.xz drakx-09af6fc79715341c9847c51e6ed342eafe5c8497.zip |
- packageCallbackChoices: use prefered packages given by perl-URPM 2.00
and perl-URPM now handles nicely locales-* as prefered packages
-rw-r--r-- | perl-install/install/NEWS | 1 | ||||
-rw-r--r-- | perl-install/install/pkgs.pm | 19 |
2 files changed, 7 insertions, 13 deletions
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index d997a9eef..cd5cd51ce 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -1,5 +1,6 @@ - fix typo breaking reading fstab with UUID= entries - don't set $o->{security} until accepted (#33567) +- packageCallbackChoices: use prefered packages given by perl-URPM 2.00 Version 10.4.195 - 14 September 2007, by Olivier "blino" Blin 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; + (); } } |