From 09af6fc79715341c9847c51e6ed342eafe5c8497 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 14 Sep 2007 15:17:04 +0000 Subject: - packageCallbackChoices: use prefered packages given by perl-URPM 2.00 and perl-URPM now handles nicely locales-* as prefered packages --- perl-install/install/NEWS | 1 + perl-install/install/pkgs.pm | 19 ++++++------------- 2 files changed, 7 insertions(+), 13 deletions(-) (limited to 'perl-install/install') 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; + (); } } -- cgit v1.2.1