From f66f5ce0b2a1abbec4081ea1b11a3bbec8e9be55 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Wed, 17 Sep 2003 14:29:08 +0000 Subject: make always sure rpmdb is closed before attempting installation. --- perl-install/pkgs.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'perl-install') diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm index d58ce2481..bbd260511 100644 --- a/perl-install/pkgs.pm +++ b/perl-install/pkgs.pm @@ -926,10 +926,10 @@ sub install($$$;$$) { my ($prefix, $isUpgrade, $toInstall, $packages) = @_; my %packages; - return if $::g_auto_install || !scalar(@$toInstall); - delete $packages->{rpmdb}; #- make sure rpmdb is closed before. + return if $::g_auto_install || !scalar(@$toInstall); + #- for root loopback'ed /boot my $loop_boot = loopback::prepare_boot(); @@ -1146,9 +1146,10 @@ sub install($$$;$$) { sub remove { my ($prefix, $toRemove, $packages) = @_; + delete $packages->{rpmdb}; #- make sure rpmdb is closed before. + return if $::g_auto_install || !@{$toRemove || []}; - delete $packages->{rpmdb}; #- make sure rpmdb is closed before. my $db = rpmDbOpenForInstall($prefix) or die "error opening RPM database: ", c::rpmErrorString(); my $trans = $db->create_transaction($prefix); -- cgit v1.2.1