Mageia Bugzilla – Attachment 4175 Details for
Bug 3723
locale needed for country settings get lost in liveDVD / liveCD install
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
patch to fix selection of unneeded locales in installer
drakx-select-locale-also-for-country.patch (text/plain), 962 bytes, created by
Pablo Saratxaga
on 2013-06-28 13:54:30 CEST
(
hide
)
Description:
patch to fix selection of unneeded locales in installer
Filename:
MIME Type:
Creator:
Pablo Saratxaga
Created:
2013-06-28 13:54:30 CEST
Size:
962 bytes
patch
obsolete
>--- drakx_bak/trunk/perl-install/pkgs.pm 2013-06-28 13:33:38.295552496 +0200 >+++ drakx/trunk/perl-install/pkgs.pm 2013-06-28 13:42:31.064221070 +0200 >@@ -242,9 +242,13 @@ > require lang; > my $locales_prefix = 'locales-'; > my $locale = lang::read(); >- my $selected_locale = $locales_prefix . lang::locale_to_main_locale($locale->{lang}); >+ my @selected_locales >+ push @selected_locales, $locales_prefix . lang::locale_to_main_locale($locale->{lang}); >+ push @selected_locales, $locales_prefix . lang::c2locale($locale->{country}); > my @available_locales = $do_pkgs->are_installed($locales_prefix . '*'); >- member($selected_locale, @available_locales) ? difference2(\@available_locales, [ $selected_locale ]) : (); >+ member($selected_locale, @available_locales) ? >+ my @unneeded_locales = difference2(\@available_locales, \@selected_locales); >+ $do_pkgs->are_installed(@unneeded_locales); > } > > sub remove_unused_packages {
--- drakx_bak/trunk/perl-install/pkgs.pm 2013-06-28 13:33:38.295552496 +0200 +++ drakx/trunk/perl-install/pkgs.pm 2013-06-28 13:42:31.064221070 +0200 @@ -242,9 +242,13 @@ require lang; my $locales_prefix = 'locales-'; my $locale = lang::read(); - my $selected_locale = $locales_prefix . lang::locale_to_main_locale($locale->{lang}); + my @selected_locales + push @selected_locales, $locales_prefix . lang::locale_to_main_locale($locale->{lang}); + push @selected_locales, $locales_prefix . lang::c2locale($locale->{country}); my @available_locales = $do_pkgs->are_installed($locales_prefix . '*'); - member($selected_locale, @available_locales) ? difference2(\@available_locales, [ $selected_locale ]) : (); + member($selected_locale, @available_locales) ? + my @unneeded_locales = difference2(\@available_locales, \@selected_locales); + $do_pkgs->are_installed(@unneeded_locales); } sub remove_unused_packages {
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 3723
:
2245
|
4175
|
4899
|
6347