diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2000-03-08 00:32:57 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2000-03-08 00:32:57 +0000 |
commit | 96f663a1c39517c951282184848bf55ac22d1c15 (patch) | |
tree | c2737c74f07e4b808fd298e5506e7d80f1ff718e /perl-install/install_any.pm | |
parent | 26f5c1cfb24bff40293d312c04572ab38a0148a0 (diff) | |
download | drakx-96f663a1c39517c951282184848bf55ac22d1c15.tar drakx-96f663a1c39517c951282184848bf55ac22d1c15.tar.gz drakx-96f663a1c39517c951282184848bf55ac22d1c15.tar.bz2 drakx-96f663a1c39517c951282184848bf55ac22d1c15.tar.xz drakx-96f663a1c39517c951282184848bf55ac22d1c15.zip |
no_comment
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r-- | perl-install/install_any.pm | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index 716789238..e77c4af61 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -122,7 +122,7 @@ sub setPackages($) { my ($o) = @_; require pkgs; - if (is_empty_array_ref($o->{packages})) { + if (!$o->{packages} || is_empty_hash_ref($o->{packages}[0])) { $o->{packages} = pkgs::psUsingHdlist($o->{prefix}); push @{$o->{default_packages}}, "nfs-utils-clients" if $o->{method} eq "nfs"; @@ -147,6 +147,15 @@ sub setPackages($) { $_->{values} = [ map { $_ + 50 } @{$_->{values}} ] foreach grep {$_} map { $o->{packages}{$_} } @l; grep { !pkgs::packageByName($o->{packages}, $_) && log::l("missing base package $_") } @{$o->{base}} and die "missing some base packages"; + + foreach (@{$o->{base}}) { + my $p = pkgs::packageByName($o->{packages}, $_) or log::l("missing base package $_"), next; + pkgs::selectPackage($o->{packages}, $p, 1); + } + + #- must be done after selecting base packages (to save memory) + pkgs::getProvides($o->{packages}); + } else { pkgs::unselectAllPackages($o->{packages}); } @@ -154,14 +163,10 @@ sub setPackages($) { #- this will be done if necessary in the selectPackagesToUpgrade, #- move the selection here ? this will remove the little window. unless ($o->{isUpgrade}) { - do { - my $p = pkgs::packageByName($o->{packages}, $_) or log::l("missing base package $_"), next; - pkgs::selectPackage($o->{packages}, $p, 1); - } foreach @{$o->{base}}; - do { + foreach (@{$o->{default_packages}}) { my $p = pkgs::packageByName($o->{packages}, $_) or log::l("missing add-on package $_"), next; pkgs::selectPackage($o->{packages}, $p); - } foreach @{$o->{default_packages}}; + } } } @@ -502,6 +507,10 @@ sub install_urpmi { (my $name = _("installation")) =~ s/\s/_/g; #- in case translators are too good :-/ { + local *F = getFile("depslist"); + output("$prefix/var/lib/urpmi/depslist", <F>); + } + { local *LIST; open LIST, ">$prefix/var/lib/urpmi/list.$name" or log::l("failed to write list.$name"), return; |