diff options
author | Pascal Rigaux <pixel@mandriva.com> | 1999-09-19 20:23:15 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 1999-09-19 20:23:15 +0000 |
commit | 19ca59fe329e6cb97cc3681e70c12d81a022dbcc (patch) | |
tree | 63854174408e6a69b7735815d35d053dafc4e8c9 /perl-install/pkgs.pm | |
parent | 25f65beed0677fa247c513705dbf538225f979c4 (diff) | |
download | drakx-19ca59fe329e6cb97cc3681e70c12d81a022dbcc.tar drakx-19ca59fe329e6cb97cc3681e70c12d81a022dbcc.tar.gz drakx-19ca59fe329e6cb97cc3681e70c12d81a022dbcc.tar.bz2 drakx-19ca59fe329e6cb97cc3681e70c12d81a022dbcc.tar.xz drakx-19ca59fe329e6cb97cc3681e70c12d81a022dbcc.zip |
no_comment
Diffstat (limited to 'perl-install/pkgs.pm')
-rw-r--r-- | perl-install/pkgs.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm index eb5f02a0a..2d50d8712 100644 --- a/perl-install/pkgs.pm +++ b/perl-install/pkgs.pm @@ -19,7 +19,7 @@ $size_correction_ratio = 1.04; sub Package { my ($packages, $name) = @_; - $packages->{$name} or log::l("unknown package $name") && undef; + $packages->{$name} or log::l("unknown package `$name'") && undef; } sub select($$;$) { @@ -28,9 +28,8 @@ sub select($$;$) { $p->{base} ||= $base; $p->{selected} = -1; #- selected by user my %l; @l{@{$p->{deps} || die "missing deps file"}} = (); - while (do { while (($n, $v) = each %l) { last if !defined $v; } $n }) { + while (do { my %l = %l; while (($n, $v) = each %l) { last if $v != 1; } $n }) { $l{$n} = 1; - $n =~ /|/ and $n = first(split '\|', $n); #-TODO better handling of choice my $i = Package($packages, $n) or next; $i->{base} ||= $base; $i->{deps} or log::l("missing deps for $n"); @@ -39,6 +38,7 @@ sub select($$;$) { } $i->{selected}++ unless $i->{selected} == -1; } + 1; } sub unselect($$;$) { my ($packages, $p, $size) = @_; @@ -139,7 +139,7 @@ sub getDeps($) { my $f = install_any::getFile("depslist") or die "can't find dependencies list"; foreach (<$f>) { my ($name, $size, @deps) = split; - ($name, @deps) = map { chop_version($_) } ($name, @deps); + ($name, @deps) = map { chop_version(first(split '\|')) } ($name, @deps); #-TODO better handling of choice $packages->{$name} or next; $packages->{$name}{size} = $size; $packages->{$name}{deps} = \@deps; |