diff options
author | Pascal Rigaux <pixel@mandriva.com> | 1999-12-20 00:05:37 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 1999-12-20 00:05:37 +0000 |
commit | 73664f3bb1816f30dfe94f41ea6241a9c5328114 (patch) | |
tree | 5d2278393b17bb855173b88c47f85d153624cf9f /perl-install/pkgs.pm | |
parent | 3fae0b21431abe463ca6bfa2746d48d6a6756aa4 (diff) | |
download | drakx-73664f3bb1816f30dfe94f41ea6241a9c5328114.tar drakx-73664f3bb1816f30dfe94f41ea6241a9c5328114.tar.gz drakx-73664f3bb1816f30dfe94f41ea6241a9c5328114.tar.bz2 drakx-73664f3bb1816f30dfe94f41ea6241a9c5328114.tar.xz drakx-73664f3bb1816f30dfe94f41ea6241a9c5328114.zip |
no_comment
Diffstat (limited to 'perl-install/pkgs.pm')
-rw-r--r-- | perl-install/pkgs.pm | 32 |
1 files changed, 6 insertions, 26 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm index 4b00800a7..a50f8a54e 100644 --- a/perl-install/pkgs.pm +++ b/perl-install/pkgs.pm @@ -79,8 +79,8 @@ sub select($$;$) { } 1; } -sub unselect($$;$) { - my ($packages, $p, $size) = @_; +sub unselect($$) { + my ($packages, $p) = @_; $p->{base} and return; my $set = set_new($p->{name}); my $l = $set->{list}; @@ -98,26 +98,10 @@ sub unselect($$;$) { $i->{selected} <= 0 || $i->{base} and next; if (--$i->{selected} == 0) { - push @$l, @{$i->{deps} || []} if !$size || ($size -= $i->{size}) > 0; + push @$l, @{$i->{deps} || []}; } } - return if defined $size && $size <= 0; - -#- #- garbage collect for circular dependencies -#- my $changed = 0; #1; -#- while ($changed) { -#- $changed = 0; -#- NEXT: foreach my $p (grep { $_->{selected} > 0 && !$_->{base} } values %$packages) { -#- my $set = set_new(@{$p->{provides}}); -#- foreach (@{$set->{list}}) { -#- my $q = Package($packages, $_); -#- $q->{selected} == -1 || $q->{base} and next NEXT; -#- set_add($set, @{$q->{provides}}) if $q->{selected}; -#- } -#- $p->{selected} = 0; -#- $changed = 1; -#- } -#- } + 1; } sub toggle($$) { my ($packages, $p) = @_; @@ -306,7 +290,7 @@ sub setSelectedFromCompssList { $nb += $_->{size} if $_->{selected}; } if ($nb > $max_size) { - unselect($packages, $p, $nb - $max_size) unless $isUpgrade; + unselect($packages, $p) unless $isUpgrade; $min_level = $p->{values}[$ind]; last; } @@ -545,10 +529,6 @@ sub install($$$) { my ($prefix, $isUpgrade, $toInstall) = @_; my %packages; - foreach my $p (@$toInstall) { - print "$p->{name}\n"; - } - return if $::g_auto_install; log::l("reading /usr/lib/rpm/rpmrc"); @@ -586,7 +566,7 @@ sub install($$$) { my $callbackOpen = sub { my $f = (my $p = $packages{$_[0]})->{file}; print LOG "$f\n"; - my $fd = install_any::getFile($f) or log::l("bad file $f"); + my $fd = install_any::getFile($f) or log::l("ERROR: bad file $f"); $fd ? fileno $fd : -1; }; my $callbackClose = sub { $packages{$_[0]}{installed} = 1; }; |