summaryrefslogtreecommitdiffstats
path: root/perl-install/pkgs.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-10-13 11:41:53 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-10-13 11:41:53 +0000
commit3edbeac41e23ee13ff3e0c9c815c4ab93b279fd2 (patch)
treefbc6900f93a37f93731d0be67b95fa5a83928564 /perl-install/pkgs.pm
parent5521ae98ce86e69166df6f72126bf0c300c069f4 (diff)
downloaddrakx-3edbeac41e23ee13ff3e0c9c815c4ab93b279fd2.tar
drakx-3edbeac41e23ee13ff3e0c9c815c4ab93b279fd2.tar.gz
drakx-3edbeac41e23ee13ff3e0c9c815c4ab93b279fd2.tar.bz2
drakx-3edbeac41e23ee13ff3e0c9c815c4ab93b279fd2.tar.xz
drakx-3edbeac41e23ee13ff3e0c9c815c4ab93b279fd2.zip
no_comment
Diffstat (limited to 'perl-install/pkgs.pm')
-rw-r--r--perl-install/pkgs.pm34
1 files changed, 13 insertions, 21 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index b78ec1d24..eb72a1bf1 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -170,7 +170,7 @@ sub getDeps($) {
sub readCompss($) {
my ($packages) = @_;
- my (@compss, $ps);
+ my ($compss, $compss_, $ps) = { childs => {} };
my $f = install_any::getFile("compss") or die "can't find compss";
foreach (<$f>) {
@@ -178,19 +178,25 @@ sub readCompss($) {
s/#.*//;
if (/^(\S+)/) {
- $ps = [];
- push @compss, { name => $1, packages => $ps };
+ my $p = $compss;
+ my @l = split ':', $1;
+ pop @l if $l[-1] =~ /^(x11|console)$/;
+ foreach (@l) {
+ $p->{childs}{$_} ||= { childs => {} };
+ $p = $p->{childs}{$_};
+ }
+ $ps = $p->{packages} ||= [];
+ $compss_->{$1} = $p;
} else {
/(\S+)/ or log::l("bad line in compss: $_"), next;
push @$ps, $packages->{$1} || do { log::l("unknown package $1 (in compss)"); next };
}
}
- \@compss;
+ ($compss, $compss_);
}
sub readCompssList($$) {
- my ($packages, $compss) = @_;
- my %compss; map { $compss{$_->{name}} = $_ } @$compss;
+ my ($packages, $compss_) = @_;
my $f = install_any::getFile("compssList") or die "can't find compssList";
local $_ = <$f>;
@@ -201,7 +207,7 @@ sub readCompssList($$) {
/^\s*$/ || /^#/ and next;
/^packages\s*$/ and do { $e = $packages; next };
- /^categories\s*$/ and do { $e = \%compss; next };
+ /^categories\s*$/ and do { $e = $compss_; next };
my ($name, @values) = split;
@@ -221,20 +227,6 @@ sub verif_lang($$) {
!($1 eq $lang || eval { lang::text2lang($1) eq $lang } && !$@);
}
-sub setShowFromCompss($$$) {
- my ($compss, $install_class, $lang) = @_;
-
- my $l = substr($install_class, 0, 1);
-
- foreach my $c (@$compss) {
- $c->{show} = bool($c->{options} =~ /($l|\*)/);
- foreach my $p (@{$c->{packages}}) {
- local $_ = $p->{options};
- $p->{show} = /$l|\*/ && verif_lang($p, $lang);
- }
- }
-}
-
sub setSelectedFromCompssList($$$$$$) {
my ($compssListLevels, $packages, $size, $install_class, $lang, $isUpgrade) = @_;
my ($level, $ind) = 100;