From e9e30736048fc25539f6e662247121a0550992a1 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Sat, 1 Sep 2001 15:23:55 +0000 Subject: avoid deleting package from %packages in install() when closing fd associated, if the open is called again (?), it will cause an invalid file (seems to happens on some invalid file). --- perl-install/pkgs.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm index 756ca1800..b3bee1ee2 100644 --- a/perl-install/pkgs.pm +++ b/perl-install/pkgs.pm @@ -1247,13 +1247,13 @@ sub install($$$;$$) { init_db($prefix); my $callbackOpen = sub { - my $p = $packages{$_[0]}; + my $p = $packages{$_[0]} or log::l("unable to retrieve package of $_[0]"), return -1; my $f = packageFile($p); print LOG "$f $p->[$MEDIUM]{descr}\n"; my $fd = install_any::getFile($f, $p->[$MEDIUM]{descr}); $fd ? fileno $fd : -1; }; - my $callbackClose = sub { packageSetFlagInstalled(delete $packages{$_[0]}, 1) }; + my $callbackClose = sub { packageSetFlagInstalled($packages{$_[0]}, 1) }; #- do not modify/translate the message used with installCallback since #- these are keys during progressing installation, or change in other -- cgit v1.2.1