From 7951c0e02df7a277bb5336df934c0349c74a7f41 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 2 Sep 2005 09:58:18 +0000 Subject: opening rpm db in selectPackage(), so remove some rpmDbOpen() --- perl-install/install_any.pm | 1 - perl-install/install_steps.pm | 1 - perl-install/pkgs.pm | 2 ++ 3 files changed, 2 insertions(+), 2 deletions(-) (limited to 'perl-install') diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index d5bc846fc..545215f1a 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -257,7 +257,6 @@ sub setup_postinstall_rpms($$) { my %toCopy; #- compute closure of package that may be copied, use INSTALL category #- in rpmsrate. - $packages->{rpmdb} ||= pkgs::rpmDbOpen(); pkgs::select_by_package_names($packages, $packages->{needToCopy} || [], 0, \%toCopy); delete $packages->{rpmdb}; diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index cbcb936cd..15ee7014a 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -417,7 +417,6 @@ sub pkg_install { if ($::testing) { log::l(qq(selecting package "$_")) foreach @l; } else { - $o->{packages}{rpmdb} ||= pkgs::rpmDbOpen(); pkgs::selectPackage($o->{packages}, pkgs::packageByName($o->{packages}, $_) || die "$_ rpm not found") foreach @l; } my @toInstall = pkgs::packagesToInstall($o->{packages}); diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm index 92b07e284..f35ea7e30 100644 --- a/perl-install/pkgs.pm +++ b/perl-install/pkgs.pm @@ -298,6 +298,8 @@ sub selectPackage { #- is only used for unselection, not selection) my $state = $packages->{state} ||= {}; + $packages->{rpmdb} ||= rpmDbOpen(); + my @l = $packages->resolve_requested($packages->{rpmdb}, $state, packageRequest($packages, $pkg) || {}, callback_choices => \&packageCallbackChoices); -- cgit v1.2.1