summaryrefslogtreecommitdiffstats
path: root/perl-install/pkgs.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-09-03 18:20:05 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-09-03 18:20:05 +0000
commitfd908603f3d9a89a3f36f706b43ea8af0ddc25d4 (patch)
tree0496e66775f4f2c1e248512d4e82ec2a15ff3d18 /perl-install/pkgs.pm
parenta271a36ef0b244131d70f2e49b76c05338c5d425 (diff)
downloaddrakx-fd908603f3d9a89a3f36f706b43ea8af0ddc25d4.tar
drakx-fd908603f3d9a89a3f36f706b43ea8af0ddc25d4.tar.gz
drakx-fd908603f3d9a89a3f36f706b43ea8af0ddc25d4.tar.bz2
drakx-fd908603f3d9a89a3f36f706b43ea8af0ddc25d4.tar.xz
drakx-fd908603f3d9a89a3f36f706b43ea8af0ddc25d4.zip
no_comment
Diffstat (limited to 'perl-install/pkgs.pm')
-rw-r--r--perl-install/pkgs.pm16
1 files changed, 8 insertions, 8 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index c3ccabe05..86480ab70 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -175,7 +175,8 @@ sub readCompssList($) {
if (/(.*):$/) {
$compssList{$1} = $list = [];
} else {
- my $p = $packages->{$_} or log::l("unknown package $_ (in compss)"), next;
+ chomp;
+ my $p = $packages->{$_} or log::l("unknown package $_ (in compssList)"), next;
push @$list, $p;
}
}
@@ -183,10 +184,11 @@ sub readCompssList($) {
}
sub verif_lang($$) {
- local $_ = shift;
- my $lang = shift;
+ my ($p, $lang) = @_;
local $SIG{__DIE__} = 'none';
- /-([^-]*)$/ && ($1 eq $lang || eval { lang::text2lang($1) eq $lang } && !$@);
+ $p->{options} =~ /l/ or return 1;
+ $p->{name} =~ /-([^-]*)$/ or return 1;
+ !($1 eq $lang || eval { lang::text2lang($1) eq $lang } && !$@);
}
sub setShowFromCompss($$$) {
@@ -198,7 +200,7 @@ sub setShowFromCompss($$$) {
$c->{show} = bool($c->{options} =~ /($l|\*)/);
foreach my $p (@{$c->{packages}}) {
local $_ = $p->{options};
- $p->{show} = /$l|\*/ && (!/l/ || verif_lang($p->{name}, $lang));
+ $p->{show} = /$l|\*/ && verif_lang($p, $lang);
}
}
}
@@ -208,9 +210,7 @@ sub setSelectedFromCompssList($$$$$) {
my $l = $compssList->{$install_class} or log::l("no $_ entry in compssList"), return;
foreach (@$l) {
- local $_ = $_->{options};
- /l/ && !verif_lang($_->{name}, $lang) and next;
-
+ verif_lang($_, $lang) or next;
&select($packages, $_);
my $nb = 0; foreach (values %$packages) {