summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2001-09-01 15:23:55 +0000
committerFrancois Pons <fpons@mandriva.com>2001-09-01 15:23:55 +0000
commite9e30736048fc25539f6e662247121a0550992a1 (patch)
tree293ddc9164576905710b2135c15de9a7ab02722e /perl-install
parent1f16a4f100d51e647d2615d88e9bf66421a7bbb7 (diff)
downloaddrakx-backup-do-not-use-e9e30736048fc25539f6e662247121a0550992a1.tar
drakx-backup-do-not-use-e9e30736048fc25539f6e662247121a0550992a1.tar.gz
drakx-backup-do-not-use-e9e30736048fc25539f6e662247121a0550992a1.tar.bz2
drakx-backup-do-not-use-e9e30736048fc25539f6e662247121a0550992a1.tar.xz
drakx-backup-do-not-use-e9e30736048fc25539f6e662247121a0550992a1.zip
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).
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/pkgs.pm4
1 files 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