summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/install_any.pm12
1 files 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});
}
}