From 3b81169be1f89b6c9f72c599c91f74e906fa8249 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Mon, 15 Jul 2002 17:56:18 +0000 Subject: synced with other module updated. --- perl-install/install_any.pm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index 9d09ad9af..165025f21 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -195,7 +195,7 @@ sub allowNVIDIA_rpms { foreach (keys %{$packages->{names}}) { my ($ext, $version, $release) = /kernel[^-]*(-smp|-enterprise|-secure)?(?:-(\d.*?)\.(\d+mdk))?$/ or next; my $p = pkgs::packageByName($packages, $_); - pkgs::packageSelectedOrInstalled($p) or next; + $p->flag_available or next; $version or ($version, $release) = ($p->version, $p->release); my $name = "NVIDIA_kernel-$version-$release$ext"; pkgs::packageByName($packages, $name) or return; @@ -299,12 +299,15 @@ sub preConfigureTimezone { } sub setPackages { - my ($o) = @_; + my ($o, $rebuild_needed) = @_; require pkgs; - if (!$o->{packages} || is_empty_hash_ref($o->{packages}{names})) { + if (!$o->{packages} || is_empty_hash_ref($o->{packages}{depslist})) { $o->{packages} = pkgs::psUsingHdlists($o->{prefix}, $o->{method}); + #- open rpm db according to right mode needed. + $o->{packages}{rpmdb} ||= pkgs::rpmDbOpen($o->{prefix}, $rebuild_needed); + pkgs::getDeps($o->{prefix}, $o->{packages}); pkgs::selectPackage($o->{packages}, pkgs::packageByName($o->{packages}, 'basesystem') || die("missing basesystem package"), 1); @@ -322,6 +325,9 @@ sub setPackages { #- this has to be done to make sure necessary files for urpmi are #- present. pkgs::psUpdateHdlistsDeps($o->{prefix}, $o->{method}, $o->{packages}); + + #- open rpm db (always without rebuilding db, it should be false at this point). + $o->{packages}{rpmdb} ||= pkgs::rpmDbOpen($o->{prefix}); } } -- cgit v1.2.1