diff options
Diffstat (limited to 'perl-install/pkgs.pm')
-rw-r--r-- | perl-install/pkgs.pm | 7 |
1 files changed, 4 insertions, 3 deletions
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); |