summaryrefslogtreecommitdiffstats
path: root/perl-install/pkgs.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-09-05 14:26:28 +0000
committerOlivier Blin <oblin@mandriva.com>2008-09-05 14:26:28 +0000
commitb998ce73afeffd221b2eb42955187006dc5f22e0 (patch)
tree67d44c33dacc16412203c5ad8a811c0e061bffb0 /perl-install/pkgs.pm
parent0773ca097f1d8674f72c0822fea209e692510ddf (diff)
downloaddrakx-b998ce73afeffd221b2eb42955187006dc5f22e0.tar
drakx-b998ce73afeffd221b2eb42955187006dc5f22e0.tar.gz
drakx-b998ce73afeffd221b2eb42955187006dc5f22e0.tar.bz2
drakx-b998ce73afeffd221b2eb42955187006dc5f22e0.tar.xz
drakx-b998ce73afeffd221b2eb42955187006dc5f22e0.zip
extract detect_unselected_locale_packages function
Diffstat (limited to 'perl-install/pkgs.pm')
-rw-r--r--perl-install/pkgs.pm10
1 files changed, 10 insertions, 0 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index e7809a048..dea3f3273 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -211,4 +211,14 @@ sub detect_unused_hardware_packages {
$do_pkgs->are_installed(@unneeded_hardware_packages);
}
+sub detect_unselected_locale_packages {
+ my ($do_pkgs) = @_;
+ require lang;
+ my $locales_prefix = 'locales-';
+ my $locale = lang::read();
+ my $selected_locale = $locales_prefix . $locale->{lang};
+ my @available_locales = $do_pkgs->are_installed($locales_prefix . '*');
+ member($selected_locale, @available_locales) ? difference2(\@available_locales, [ $selected_locale ]) : ();
+}
+
1;