diff options
author | Pascal Rigaux <pixel@mandriva.com> | 1999-10-25 22:59:18 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 1999-10-25 22:59:18 +0000 |
commit | d80182fb067de110a09af88969ab9844e11ce21d (patch) | |
tree | 93726966b4a51341fca6fa8d4bc290ed35f402f1 /perl-install/pkgs.pm | |
parent | 31ad0827997c40a6471cbe0eddc3b89534d07323 (diff) | |
download | drakx-d80182fb067de110a09af88969ab9844e11ce21d.tar drakx-d80182fb067de110a09af88969ab9844e11ce21d.tar.gz drakx-d80182fb067de110a09af88969ab9844e11ce21d.tar.bz2 drakx-d80182fb067de110a09af88969ab9844e11ce21d.tar.xz drakx-d80182fb067de110a09af88969ab9844e11ce21d.zip |
no_comment
Diffstat (limited to 'perl-install/pkgs.pm')
-rw-r--r-- | perl-install/pkgs.pm | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm index e12d2b4b3..e32d8c8f4 100644 --- a/perl-install/pkgs.pm +++ b/perl-install/pkgs.pm @@ -19,7 +19,7 @@ XFree86-Sun XFree86-SunMono XFree86-Sun24 XFree86-3DLabs kernel-BOOT MySQL MySQL_GPL mod_php3 midgard postfix metroess metrotmpl hackkernel hackkernel-BOOT hackkernel-fb hackkernel-headers hackkernel-pcmcia-cs hackkernel-smp hackkernel-smp-fb -);#) +); sub correctSize { (20471 - $_[0])*$_[0]/16258 } #- size correction in MB. @@ -396,6 +396,7 @@ sub selectPackagesToUpgrade($$$) { sub install($$) { my ($prefix, $toInstall) = @_; + my %packages; return if $::g_auto_install; @@ -413,7 +414,8 @@ sub install($$) { $p->{file} ||= sprintf "%s-%s-%s.%s.rpm", $p->{name}, $p->{version}, $p->{release}, c::headerGetEntry(getHeader($p), 'arch'); - c::rpmtransAddPackage($trans, getHeader($p), $p->{file}, $p->{name} !~ /kernel/); #- TODO: replace `named kernel' by `provides kernel' + $packages{$p->{name}} = $p; + c::rpmtransAddPackage($trans, getHeader($p), $p->{name}, $p->{name} !~ /kernel/); #- TODO: replace `named kernel' by `provides kernel' # c::rpmtransAddPackage($trans, getHeader($p), $p->{file}, 1); #- TODO: replace `named kernel' by `provides kernel' $nb++; $total += $p->{size}; @@ -433,11 +435,12 @@ sub install($$) { #- !! do not translate these messages, they are used when catched (cf install_steps_graphical) my $callbackOpen = sub { - print LOG "$_[0]\n"; - my $fd = install_any::getFile($_[0]) or log::l("bad file $_[0]"); + my $f = (my $p = $packages{$_[0]})->{file}; + print LOG "$f\n"; + my $fd = install_any::getFile($f) or log::l("bad file $f"); $fd ? fileno $fd : -1; }; - my $callbackClose = sub { }; + my $callbackClose = sub { $packages{$_[0]}{installed} = 1; }; my $callbackStart = sub { log::ld("starting installing package ", $_[0]) }; my $callbackProgress = sub { log::ld("progressing installation ", $_[0], "/", $_[1]) }; @@ -454,8 +457,6 @@ sub install($$) { c::rpmtransFree($trans); c::rpmdbClose($db); log::l("rpm database closed"); - - $_->{installed} = 1 foreach @$toInstall; } 1; |